[Gllug] sort & uniq

Mark Hill gllug_list at mark.ukfsn.org
Mon Aug 4 23:04:08 UTC 2003


On Mon, Aug 04, 2003 at 11:21:28PM +0100, Daniel Andersson wrote:
> 
> nah
> 
> 
> daniel at cj:~# more cj
> 225
> 102
> 225
> 
> 
> daniel at cj:~# sort cj | uniq -c
>       1 102
>       2 225
> 
> 
> so it works there

But do any of the numbers in the file you're having problems with have
any spaces at the end? You could use tr to get rid of all whitespaces,
if that happens to be a possibility.

e.g:

sort file | tr -d [:blank:] | uniq -c

-- 
Mark Hill

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list