Skip to content

Instantly share code, notes, and snippets.

@miaoski
Created April 4, 2014 06:44
Show Gist options
  • Save miaoski/9969371 to your computer and use it in GitHub Desktop.
Save miaoski/9969371 to your computer and use it in GitHub Desktop.
#!/bin/bash
pingme() {
ping -c1 -w1 $1 &> /dev/null
if [ $? -eq 0 ]; then
echo -e "$1\tOK"
else
echo -e "$1\tFailed"
fi
}
while true; do
clear
pingme 192.168.2.241
pingme 192.168.2.242
pingme 192.168.2.243
pingme 192.168.2.1
pingme 192.168.2.124
pingme 192.168.2.125
pingme 192.168.2.211
pingme 192.168.2.212
pingme 192.168.2.214
pingme 192.168.2.216
pingme 192.168.2.217
pingme 192.168.2.143
sleep 3
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment