by eridius · 12y ago · 0 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.Arguably your solution is still different because you sort the input instead of the output, but that's unlikely to matter here.
Although FWIW I just checked and the `sort` tool actually has a flag for uniquing during the sort. I don't know if that's portable though.
sort -u file1.txt file2.txt | tr A-Z a-z > whitelist.txt