Skip to content

Instantly share code, notes, and snippets.

@simbalinux
Last active June 14, 2018 15:45
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 simbalinux/27cf28d5efe11ed188c29a16d414e426 to your computer and use it in GitHub Desktop.
Save simbalinux/27cf28d5efe11ed188c29a16d414e426 to your computer and use it in GitHub Desktop.
append /etc/hosts
#!/usr/bin/bash
grep -q -F '192.168.49.10 web1.example.com web1' /etc/hosts || echo '192.168.49.10 web1.example.com web1' >> /etc/hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment