Advertisement
Guest User

Untitled

a guest
Mar 27th, 2010
605
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.38 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. function internet_connection_ok
  4.     {
  5.         clear
  6.         echo "Testing internet connection....please wait..."
  7.         if ping -W 1 -c 4 bix.hu | grep -q "4 received"; then
  8.             if ping -W 1 -c 4 www.yahoo.com | grep -q "4 received"; then echo "NET is OK"; else echo "NO INTERNET CONNECTION"; exit 1; fi
  9.         else clear; echo "NO INTERNET CONNECTION"; exit 1; fi
  10.     }
  11.  
  12. internet_connection_ok
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement