Re: [gentoo-user] [OT] Question about duplicate lines in file

2006-06-12 Thread Mike Williams
On Monday 12 June 2006 18:19, Teresa and Dale wrote: > Thanks, read the man page, it was short so it didn't take long.  I tried > this: sort would be more appropriate. I don't believe uniq will find matches anywhere in the file, i.e. 192 195 192 wouldn't get shortened, but 192 192 195 would.

Re: [gentoo-user] [OT] Question about duplicate lines in file

2006-06-12 Thread Raymond Lewis Rebbeck
On Tuesday, 13 June 2006 2:49, Teresa and Dale wrote: > Raymond Lewis Rebbeck wrote: > >On Tuesday, 13 June 2006 2:12, Teresa and Dale wrote: > >>Hi folks, > >> > >>I have batched a bunch of servers in my hosts file to block, for ads and > >>all that crap. I got them from several different places,

Re: [gentoo-user] [OT] Question about duplicate lines in file

2006-06-12 Thread Neil Bothwick
On Mon, 12 Jun 2006 12:19:46 -0500, Teresa and Dale wrote: > uniq -u /home/dale/Desktop/hosts /home/dale/Desktop/hostsort uniq only removes consecutive duplicate line, you need to use sort first sort file | uniq >newfile or, possibly, depending on the format of your file sort -u file >newfile

Re: [gentoo-user] [OT] Question about duplicate lines in file

2006-06-12 Thread Matthew Cline
On 6/12/06, Teresa and Dale <[EMAIL PROTECTED]> wrote: Thanks, read the man page, it was short so it didn't take long. I tried this: uniq -u /home/dale/Desktop/hosts /home/dale/Desktop/hostsort I think that you need to run sort on the file first, then uniq. HTH, Matt -- gentoo-user@gentoo

Re: [gentoo-user] [OT] Question about duplicate lines in file

2006-06-12 Thread Teresa and Dale
Raymond Lewis Rebbeck wrote: >On Tuesday, 13 June 2006 2:12, Teresa and Dale wrote: > > >>Hi folks, >> >>I have batched a bunch of servers in my hosts file to block, for ads and >>all that crap. I got them from several different places, some I have >>found too, and am sure there are dups in the

Re: [gentoo-user] [OT] Question about duplicate lines in file

2006-06-12 Thread Raymond Lewis Rebbeck
On Tuesday, 13 June 2006 2:12, Teresa and Dale wrote: > Hi folks, > > I have batched a bunch of servers in my hosts file to block, for ads and > all that crap. I got them from several different places, some I have > found too, and am sure there are dups in there, same server but pasted > from seve

[gentoo-user] [OT] Question about duplicate lines in file

2006-06-12 Thread Teresa and Dale
Hi folks, I have batched a bunch of servers in my hosts file to block, for ads and all that crap. I got them from several different places, some I have found too, and am sure there are dups in there, same server but pasted from several sources. I am not a programer at all and don't even really k