Skip to content

Instantly share code, notes, and snippets.

@jmervine
Created May 22, 2012 04:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmervine/2766674 to your computer and use it in GitHub Desktop.
Save jmervine/2766674 to your computer and use it in GitHub Desktop.
*/5 * * * * bash -c 'IPADDR=`cat /tmp/myip.txt` perl -e 's/^(.*)home\.remotehost/$ENV{'IPADDR'} home.remotehost/g' -p -i /etc/hosts'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment