Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
#!/bin/bash
if [ "$1" = "temp" ]; then
lynx --dump http://www.wunderground.com/auto/raw/30319 | sed -n '1p' | sed -e 's/|/ /g' | awk '{print $7}'
fi
if [ "$1" = "wind" ]; then
lynx --dump http://www.wunderground.com/auto/raw/30319 | sed -n '1p' | sed -e 's/|/ /g' | awk '{print $8}'
fi
if [ "$1" = "humidity" ]; then
lynx --dump http://www.wunderground.com/auto/raw/30319 | sed -n '1p' | sed -e 's/|/ /g' | awk '{print $10}' | sed -e 's/%//g'
fi
if [ "$1" = "dewpoint" ]; then
lynx --dump http://www.wunderground.com/auto/raw/30319 | sed -n '1p' | sed -e 's/|/ /g' | awk '{print $11}'
fi
It doesn't seem to work most of the time, I keep getting database errors on the dump file. Also it would be nice to know that you need to set the zip or the city.