[Gllug] sort & uniq

Jack Bertram jack at jbertram.net
Tue Aug 5 10:56:12 UTC 2003


* Daniel Andersson <daniel at septum.org> [030805 11:37]:
> > Dear Daniel,
> > 
> > You probably want the following.
> > 
> >     sort -n file | uniq -c | sort -n
> > 
> > The first sort is numeric and you may wish to choose a
> > delimiter.  The uniq command counts occurrences.  The second
> > sort ranks the numbers according to their frequency.
> 
> tried that
> same result, two instances of 225 in the result :o/
> 
> the file i'm 'playing' with is
> http://daniel.septum.org/testfile.txt
> 
> i can't find anything odd with any of the 225's..

Line 116,612 has a 225 with a ^M after it, which is 
throwing off uniq.

jack

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




More information about the GLLUG mailing list