public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Teresa and Dale <teendale@vista-express.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] [OT]  Question about duplicate lines in file
Date: Mon, 12 Jun 2006 12:19:46 -0500	[thread overview]
Message-ID: <448DA232.4080809@vista-express.com> (raw)
In-Reply-To: <200606130224.27021.dystopianray@gmail.com>

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 there, same server but pasted
>>from several sources.  I am not a programer at all and don't even really
>>know what to search for.  I would like to remove the duplicate entries
>>and then put them in alphabetical order if I could.  I would gladly then
>>make this available if someone wanted to host it.  I don't have a place
>>to host it.
>>
>>Oh, there is 15,000 entries in my hosts file.  O_O
>>
>>Could someone tell me how this is done?  May even learn something here.
>>If I can do this, I'm sure I will.
>>
>>Thanks.
>>
>>Dale
>>
>>:-)  :-)
>>    
>>
>
>'uniq' and 'sort' should do what you're after, check out the man pages.
>
>  
>


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

It doesn't look like it did anything but copy the same thing over. 
There are only 2 lines missing.  Does spaces count?  Some put in a lot
of spaces between the localhost and the web address.  Maybe that has a
affect??

Thanks for the help.  I had never seen that command before.  I had heard
of sort, never used it though.  I do have those on my desktop.  I'm
playing with copies instead of my real hosts file.

Thanks again.

Dale
:-)  :-)
-- 
gentoo-user@gentoo.org mailing list



  reply	other threads:[~2006-06-12 17:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-12 16:42 [gentoo-user] [OT] Question about duplicate lines in file Teresa and Dale
2006-06-12 16:54 ` Raymond Lewis Rebbeck
2006-06-12 17:19   ` Teresa and Dale [this message]
2006-06-12 17:32     ` Matthew Cline
2006-06-12 17:37     ` Raymond Lewis Rebbeck
2006-06-12 17:37     ` Neil Bothwick
2006-06-12 17:45     ` Mike Williams
2006-06-12 17:55     ` [gentoo-user] " Christer Ekholm
2006-06-12 18:39       ` Alan McKinnon
2006-06-12 19:15         ` Neil Bothwick
2006-06-12 22:52           ` Teresa and Dale
2006-06-12 23:23             ` Neil Bothwick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=448DA232.4080809@vista-express.com \
    --to=teendale@vista-express.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox