#!/bin/bash

function internet_connection_ok
	{
		clear
		echo "Testing internet connection....please wait..."
		if ping -W 1 -c 4 bix.hu | grep -q "4 received"; then 
			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
		else clear; echo "NO INTERNET CONNECTION"; exit 1; fi 
	}

internet_connection_ok

