19 points · by ctoth · 12y ago · 13 comments
cat file1.txt file2.txt | tr A-Z a-z | sort | uniq > whitelist.txt
Does this mean people aren't going to move from shell scripting to other languages? No, it just means the task is particularly suited to scripting like this, and Python has affordances for scripting. sort -u file1.txt file2.txt | tr A-Z a-z > whitelist.txtReally, the time that people start posting "Why Language X Isn't Dying" is about the time you should consider freshening your tech skills to a new language, in my experience.
cat file1 file2 | awk '!_[tolower($0)]++{ gsub(/^[ \t]+|[ \t]+$/, ""); print}'
Does that mean awk doesn't have to worry either?