From 6768eaac59da9f24ee308a5f61066cde276f5066 Mon Sep 17 00:00:00 2001 From: Dan White Date: Sat, 17 Dec 2016 16:45:24 -0600 Subject: [PATCH] update metar script --- metar.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 -- 2.25.1