Simple METAR checker for Plan9

2015-05-01

So, here's my first attempt at something useful for Plan9. It checks the METAR for a given airport:

#!/bin/rc

if (~ $#1 0){
    echo 'Usage: metar &ltID&gt'
    exit
}

hget https://aviationweather.gov/adds/dataserver_current/current/metars.cache.csv.gz | \
  gunzip -c | \
  grep -i -e ^$1 | \
  awk -F , '{print $1}'