3 ms·
Excellent, but now I realise there are repeated lines, and I need to de-duplicate. So I use sort -u to do that I would just pipe it to uniq, the ultimate solut
by userbinator 8y ago
Excellent, but now I realise there are repeated lines, and I need to de-duplicate. So I use sort -u to do that
I would just pipe it to uniq, the ultimate solution proposed --- because that seems to make more sense to me. I have not ever used the '-u' option of sort before, nor would I have expected it to have such an option (sort is for sorting, not removing duplicate lines.) Maybe because I'm more used to the "UNIX philosophy" instead of the GNU one?
- microtherion 8y agoI agree. Often when I want uniquing, I want counts as well, so I have to go through uniq -c anyway.