[Gllug] sort & uniq

Daniel Andersson daniel at zencudo.co.uk
Tue Aug 5 11:06:45 UTC 2003


> On Tue, 5 Aug 2003, Daniel Andersson wrote:
> 
> >> 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
> 
> The file has one of the 225's terminated with a "\r\n". The \r is being 
> included as part of the line in the comparison. I make it line 116612.

that was the problem
thank you very much (and to all the other ones that found it as well :)

may i ask how you found the \r?

ta

/ d

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




More information about the GLLUG mailing list