[NTLUG:Discuss] Need help debugging simple script commands

Steve Baker sjbaker1 at airmail.net
Mon Jul 22 03:21:26 CDT 2002


Rick Matthews wrote:
>>Don't know if you realize it or not, but there is an option within
>>sort itself that will suppress output of duplicate lines:
> 
> 
> Yes, I know it's there, and I've used it before, but I had not tried
> it here. 
> 
> I just ran a test using:
> 
> sort -u -o domains.uniq domains
> 
> and got the same exact results as the other method.  The dups are 
> still there.

Duplicates usually result from differences in the white space (eg a tab in one
record and a bunch of spaces in the other - or trailing white space on one
and not on the other).

Toss a '-i' in there - but I don't know whether that only affects the sort order
or whether it also matters for the duplicated record thing.

----------------------------- Steve Baker -------------------------------
Mail : <sjbaker1 at airmail.net>   WorkMail: <sjbaker at link.com>
URLs : http://www.sjbaker.org
        http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net
        http://prettypoly.sf.net http://freeglut.sf.net
        http://toobular.sf.net   http://lodestone.sf.net






More information about the Discuss mailing list