-
-
Save doublejosh/10502295 to your computer and use it in GitHub Desktop.
Never accidentally leave your /etc/hosts file edited again!!! Let your computer remind you.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
GOLDEN_DOMAIN="example.com" | |
PROBLEM="$(cat /etc/hosts | grep $GOLDEN_DOMAIN | grep -v '^#' | wc -w)" | |
if [ "$PROBLEM" -gt 0 ]; then | |
say omg fix yer hosts | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment