From: Dan White Date: Sat, 17 Dec 2016 22:45:24 +0000 (-0600) Subject: update metar script X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=6768eaac59da9f24ee308a5f61066cde276f5066;p=pubbin.git update metar script --- diff --git a/metar.sh b/metar.sh index bd142bc..f87fb1a 100755 --- a/metar.sh +++ b/metar.sh @@ -15,10 +15,15 @@ fi STATION=$1 + if [ $METAR -eq 1 ]; then # METAR - wget -q -O - http://weather.noaa.gov/mgetmetar.php?cccc=$STATION \ - | grep -i $STATION \ + #wget -q -O - http://weather.noaa.gov/mgetmetar.php?cccc=$STATION \ + #| grep -i $STATION \ + #| tail -1 + addr="http://www.aviationweather.gov/metar/data?ids=$STATION&format=raw&hours=0&layout=0" + wget -q -O - $addr \ + | grep -io "^$STATION[A-Za-z0-9 /]*" \ | tail -1 fi