Last active
November 9, 2016 04:28
-
-
Save ldante86/8f6d30c040ccc80c259cd8a6a0238775 to your computer and use it in GitHub Desktop.
get temperature by metar station name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ "$1" ]; then | |
| declare -u metar="$1" | |
| curl -s http://tgftp.nws.noaa.gov/weather/current/${metar}.html | \ | |
| grep -A 5 Temperature | grep "F ([0-9]" | awk -F ">" '{print $3}' | sed 's/(.*//' | sed 's/^ *//' | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment