Bash Script to Download TAF Data From NWS

Linux Bash Script to Download TAF Data from the NWS to Display in the Console

 

Usage:
taf [ICAO STATION ID]
Example: $taf kslc

Save the following in a file called taf:

#!/bin/bash
station=$(echo "$1" | tr '[:lower:]' '[:upper:]')
wget -q -O /home/$USER/taftmp http://weather.noaa.gov/pub/data/forecasts/taf/stations/$station.TXT
echo " "
more /home/$USER/taftmp
echo " "
rm /home/$USER/taftmp

Leave a Reply

Your email address will not be published. Required fields are marked *