I'm confusing use of uniq command, can anyone explain this command and how to use it?
How to use uniq without specifying any option?
Any example would be helped and appreciated
|
I'm confusing use of How to use Any example would be helped and appreciated |
|||
|
uniq read file line-by-line, and only consider a duplicate when the current line is exactly the same as the last line, i.e for a input file like this,
You'll get an output like this,
To use it, you can either run it though a pipe, i.e
Or get the input from a file like this,
|
|||||||||||
|
man uniq. – MaxMackie Mar 8 at 3:05