aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmetar4
1 files changed, 2 insertions, 2 deletions
diff --git a/metar b/metar
index 5d66e7b..e3c4c69 100755
--- a/metar
+++ b/metar
@@ -7,7 +7,7 @@ metar_url ()
{
url="http://tgftp.nws.noaa.gov/data/observations/metar/decoded"
if test $# = 1; then
- echo "${url}/${1}.TXT"
+ echo "${url}/$(echo "$1" | tr '[a-z]' '[A-Z]').TXT"
else
echo "${url}/"
fi
@@ -116,7 +116,7 @@ if test $# = 1 && test "$1" = "get"; then
elif test $# = 1 && test "$1" = "print"; then
get_station
elif test $# = 2 && test "$1" = "set"; then
- echo "$2" > ~/.config/metar
+ echo "$2" | tr '[a-z]' '[A-Z]' > ~/.config/metar
elif test $# = 1 && test "$1" = "list"; then
list_stations ""
elif test $# = 2 && test "$1" = "list"; then