From 56a422c542d6d99d0045adaa2face6d5e9c64888 Mon Sep 17 00:00:00 2001 From: kirbylife Date: Fri, 12 Jan 2024 22:00:27 -0600 Subject: [PATCH] add script to sort words --- sort_words.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 sort_words.sh diff --git a/sort_words.sh b/sort_words.sh new file mode 100755 index 0000000..955e1b1 --- /dev/null +++ b/sort_words.sh @@ -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