Skip to content

Instantly share code, notes, and snippets.

@rawsyntax
Forked from gary/updatehosts.sh
Created March 23, 2012 22:07
Show Gist options
  • Save rawsyntax/2175537 to your computer and use it in GitHub Desktop.
Save rawsyntax/2175537 to your computer and use it in GitHub Desktop.
#!/bin/sh
wget -O - http://someonewhocares.org/hosts/hosts > /tmp/hosts
cat /usr/local/etc/hosts >> /tmp/hosts
cp -av /etc/hosts /etc/hosts.orig
cp -av /tmp/hosts /etc/hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment