Script for sorting lists
This commit is contained in:
parent
ea92c7afd3
commit
af6ace99dd
12
arch-setup/packages/sort-lists.sh
Normal file
12
arch-setup/packages/sort-lists.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
cd "$HOME/GitProjects/setup/packages/"
|
||||
|
||||
|
||||
readarray -d '' packagefiles < <(find "$HOME/GitProjects/setup/packages/" -name "*\.txt" -print0)
|
||||
|
||||
for file in "${packagefiles[@]}"; do
|
||||
echo "Sorting $file"
|
||||
cat "$file" | sort > "${file}.tmp" && mv "${file}.tmp" "$file"
|
||||
done
|
Loading…
Reference in New Issue
Block a user