News for hackers. Stuff that matters.
Re:Stop Piping Cats by dy9 on Wednesday February 10, 2010 @10:00PM (#1116741)
What's the rationale for piping sort into wc?
Re:Stop Piping Cats by iigs on Wednesday February 10, 2010 @10:05PM (#1116757)
That looks like it was a sample line that wasn't particularly useful, but if you do:

cat file.txt | sort | uniq | wc -l ## notice uniq

it gives you the count of unique lines. If you omit the sort in that instance it will fold duplicates together a/b/a is three lines, not two.

Re:Stop Piping Cats by gnosis on Thursday February 11, 2010 @12:04AM (#1116950)
Instead of "sort | uniq" you could just use "sort -u"