[Gllug] sort & uniq

Jack Bertram jack at jbertram.net
Tue Aug 5 12:38:40 UTC 2003


* Christian Smith <csmith at micromuse.com> [030805 12:37]:
> On Tue, 5 Aug 2003, Daniel Andersson wrote:
> 
> >
> >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?
> 
> $ sort testfile | uniq -c > file
> $ vi file
> 
> The \r was shown as a ^M on the end of the line. od -c would have also 
> found the \r.
> 
> Once we knew what the dodgy character was, it was a simple case of finding 
> it in the origional file.

I did

$ grep 225 testfile > file
$ uniq -c file

which told me what line number the error was on in file.  Inspection
gave the result.

j


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




More information about the GLLUG mailing list