[CentOS] internet connection tester script
Philippe Naudin
philippe.naudin at supagro.inra.frFri Jan 28 12:01:51 UTC 2011
- Previous message: [CentOS] internet connection tester script
- Next message: [CentOS] internet connection tester script
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Le ven 28 jan 2011 03:28:22 CET, kellyremo a écrit: > [ ... ] > $ while $TORF; do ping -W 1 -c 1 bix.hu >& /dev/null && ping -W 1 -c 1 www.yahoo.com >& /dev/null && TORF=false || TORF=true; done > $ > > It just doesn't work. > > Goal: if theres no internet connection, then the oneliner must loop until there is internet connection. if theres internet connection the oneliner ends. > > what am i missing? try : until ping -W 1 -c 1 bix.hu || ping -W 1 -c 1 www.yahoo.com ; do sleep 5 done >& /dev/null Note that ping -W 1 is crazy. -- Philippe
- Previous message: [CentOS] internet connection tester script
- Next message: [CentOS] internet connection tester script
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list