4 ms·
You don't need that tr, just sort -f and then uniq -i. Of course, whoever put -f as the ignore-case flag for sort should be shot methinks, or rather the one who
by anonymous 13y ago
You don't need that tr, just sort -f and then uniq -i.
Of course, whoever put -f as the ignore-case flag for sort should be shot methinks, or rather the one who first added -i as "ignore nonprinting characters".
Edit: and while we're on the subject, you can get rid of head and use awk 'NR<=10 {print $2}'
Edit²: I would also like to point out that your version is superior to any short C# program, because sort can sort sequences that exceed the amount of RAM you have.