Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- USER=emc
- HOME=/home/emc
- SERVER="89.16.167.134"
- SERVER2="89.16.167.13"
- SERVER1="www.gentoo.org"
- PING=`/bin/ping -W1 -c1 $SERVER | grep "received" | cut -d" " -f4`
- if ! [[ "$PING" =~ ^[0-9]+$ ]] ; then
- PING=0
- fi
- echo $PING
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement