From 54b8909e3b9eac37945e8831edc18c1f2d7a3103 Mon Sep 17 00:00:00 2001 From: dee-mee Date: Sat, 1 Jun 2024 14:56:01 +0300 Subject: [PATCH] new file: weather.sh --- weather.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 weather.sh diff --git a/weather.sh b/weather.sh new file mode 100755 index 0000000..0c00e51 --- /dev/null +++ b/weather.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# weather.sh + +program=Weather +year=2024 +developer=dee-mee + +case $1 in +-h | --help) + echo "$program $version" + echo "Copyright $year $developer. All rights reserved." + echo + echo "Usage: weather [options]" + echo "Option Long Option Description" + echo "-h --help Show the help screen" + echo "-l [location] --location [location] Specifies the location" + ;; +-l | --location) + curl https://wttr.in/$2 + ;; +*) + curl https://wttr.in + ;; +esac