add script to sort words

main
kirbylife 2024-01-12 22:00:27 -06:00
parent e2c7bc243b
commit 56a422c542
1 changed files with 12 additions and 0 deletions

12
sort_words.sh 100755
View File

@ -0,0 +1,12 @@
#!/bin/bash
cp words.txt bck.words.txt
if [ $? -eq 0 ]; then
tr '[:lower:]' '[:upper:]' < words.txt | sort -u > words_tmp.txt
mv words_tmp.txt words.txt
echo "Done"
else
echo "Fail"
fi