Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Bucle infinito
- # ':' siginifica 'true'
- while :;do
- clear
- echo "Estado de conexion"
- if ping -c1 google.com > /dev/null 2>&1; then
- PING=$(ping -c 1 google.com)
- LAG=$(echo $PING | cut -d "=" -f 3 | cut -d " " -f 1)
- echo "Conexion a internet: ok"
- echo "LAG: $LAG"
- sleep 1
- else
- echo "Caonexion a internet: fail"
- sleep 1
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement