1 2 3 4 5 6 7 8 9 10
#!/bin/sh ping -c 1 $1 2>&1 >/dev/null RES=$? if [ "Z$RES" = "Z0" ] ; then echo 'vPing OK' else echo 'vPing KO' fi