Why I don’t worry about Python losing users
nothingbutsnark.svbtle.com
nothingbutsnark.svbtle.com
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.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?