Talk:Uniq

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Linux  
WikiProject icon This article is within the scope of WikiProject Linux, a collaborative effort to improve the coverage of Linux on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 ???  This article has not yet received a rating on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.
 

Example usage doesn't work on GNU/Linux[edit]

Possibly just worth a mention that the example usage given:

sort file | uniq -c | sort -n

doesn't work on Linux. uniq pads the count value on each line with some whitespace, and sort expects the first character on the line to be numeric, otherwise it doesn't perform a numeric sort. The command line given will not work as described because the first character on each line piped into sort is non-numeric. 86.132.65.107 (talk) 12:57, 21 December 2008 (UTC)

Works for me. I do this all the time on Linux. Edward (talk) 23:27, 31 January 2011 (UTC)

Article gives advice on how to do something[edit]

The first section of the article says "Be careful, uniq expects its input to be already sorted; sometimes sort -u is what you need." It should probably be reworded to sound more encyclopaedic or removed altogether.

Also, I was under the impression that sort -u was equivalent to sort | uniq.75.17.157.194 (talk) 04:40, 11 May 2009 (UTC)