From f6b139d1fbadf3285500b2bc4d2b64a9866bbdc0 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 30 Sep 2016 22:29:31 +0200 Subject: Allow lower case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- metar | 4 ++-- 1 file 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 -- cgit v1.2.3-70-g09d2