Bash Script Hosts file Ad Blocker by admin | Feb 11, 2012 | Bash, Linux, Networking, OSXPut in cron or run manually. #!/bin/bash # If this is our first run, save a copy of the system’s original hosts file and set to read-only for safety if [ ! -f /etc/hosts.bak ] then echo “Saving copy of system’s original hosts file…” sudo...