Created
February 24, 2020 19:41
-
-
Save graham/3fd8bef3d4b3815d046c3c02f4cf27bc to your computer and use it in GitHub Desktop.
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
IP=`curl -s https://www.IPChicken.com | egrep -iEo "([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)" | head -n 1` | |
if [[ "$IP" = "10.0.0.1" ]]; | |
then | |
echo -e "IP IS THE SAME $IP" | |
else | |
echo -e "\e[31m IP IS NOW $IP WHICH IS DIFFERENT \e[0m" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment