This simple shell script will test your Internet connection and then tell you if it is up or not. wgetvar=$(wget -q --tries=3 --timeout=20 --spider http://google.com) if [ $? -eq '0' ] then echo "Internet is up." else #some logging echo "Internet is down.." fi This section will test if the program run at the start …
The post Some very useful bash scripting tips for testing the output of a program. first appeared on Securitron Linux blog..Trending Articles
More Pages to Explore .....