Skip to content

Instantly share code, notes, and snippets.

@eli-oat
Created May 17, 2018 19:12
Show Gist options
  • Save eli-oat/ebf6eb2a75530c35b792db2f3734da60 to your computer and use it in GitHub Desktop.
Save eli-oat/ebf6eb2a75530c35b792db2f3734da60 to your computer and use it in GitHub Desktop.
awk '{print $1}' < $1 | while read ip; do
if ping -c1 $ip >/dev/null 2>&1; then
echo $ip IS UP
else
echo $ip IS DOWN
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment