5

Im new to bash scriping and i found this expression on a bash script what does this mean.

view full story
linux-howto

http://www.unix.com – # check host value regex='^([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}$' if [ "$(echo $host | grep '[A-Za-z]')" != "" ]; then if [[ "$(host $host)" =~ "not found" ]]; then echo host $host not found exit 4 fi elif [[ ! $host =~ $regex ]]; then echo $host is an invalid host address exit 5 fi espeacailly the top regex part? ---------- Post updated at 06:58 PM ---------- Previous update was at 06:17 PM ---------- bump ^ (HowTos)