#!/bin/sh -e if [ $# -ne 1 ] then printf "This script will return weather and time information for the entered METAR station. \n" else curl -s https://tgftp.nws.noaa.gov/data/observations/metar/decoded/$1.TXT > /tmp/$1.in.tmp sed 2q /tmp/$1.in.tmp > /tmp/$1.out.tmp grep Sky /tmp/$1.in.tmp >> /tmp/$1.out.tmp grep Temperature /tmp/$1.in.tmp | cut -b 1,2,3,4,5,6,7,8,9,10,11,12,13,20,21,22,23 >> /tmp/cyfc.out.tmp grep Humidity /tmp/$1.in.tmp >> /tmp/$1.out.tmp more /tmp/$1.out.tmp fi