#Bash Console Weather #Interex deathtrip.org # # ./weather # location=$1 loclength=`echo $location | wc -c` if [ "$loclength" == "6" ] then url="http://www.google.com/search?hl=en&ie=ISO-8859-1&q=weather+$location" weatherdump=`lynx --dump $url | sed -n 12,27p` zipcheck=`echo $weatherdump | awk '{print $1,$2}'` if [ "$zipcheck" == "Weather for" ] then echo; echo echo $weatherdump | awk '{print $1,$2,$3,$4}' echo echo -n "Current Temp: " echo $weatherdump | awk '{print $5}' echo -n "Condition: " echo $weatherdump | awk '{print $6}' echo $weatherdump | awk '{print $7,$8,$9,$10,$11}' echo $weatherdump | awk '{print $12,$13}' echo; echo else echo No Matching Zip Code. fi fi