News for hackers. Stuff that matters.
Re:Using a Hosts File To Make The Internet Not Suck As Much by ebbv on Friday February 22, 2013 @11:03AM (#5264881)
You've just illustrated his point because not all entries do point to loopback.
Re:Using a Hosts File To Make The Internet Not Suck As Much by WestCoastJustin on Friday February 22, 2013 @11:13AM (#5264955)
Looking at the body of the text, rather than the head/footer, and excluding comments lines, here is what I get with counts:

  [~]$ cat hosts_example.txt | grep -v '#' | awk '{print $1}'| sort | uniq -c
       56 
        1 ::1
     9674 127.0.0.1
        1 255.255.255.255
        1 fe80::1%lo0
Re:Using a Hosts File To Make The Internet Not Suck As Much by to3m on Friday February 22, 2013 @11:08AM (#5264929)
if you pass it through grep, you can see that virtually every non-comment line refers to 127.0.0.1:

    ~/tmp% grep -v "^[[:space:]]*#" fred.txt | grep -v "^[[:space:]]*$" | grep -v 127.0.0.1
    books
    guestbook
    hosts
      text file
      rss feed
      0.0.0.0
      0 text file
      old macs
      0 old macs
    math links
    origami
    photos
    polls
    siteoftheday
    home
     Hosted by:
      theorem.ca
    how to make the internet not suck (as much)
    255.255.255.255	broadcasthost
    ::1		localhost
    fe80::1%lo0     localhost
    Fri Feb 22 08:05:36 2013top
    ~/tmp%
And I just realised now that the junk at the top of the output comes from me doing a Select All on the web page to highlight everything first, and it picked up the headers! Ooops. So there's in fact 3 non-comment lines that don't refer to localhost.