Last active
May 17, 2022 16:11
-
-
Save xZero707/4ebe0768299d9c8cb26580e48d2081d7 to your computer and use it in GitHub Desktop.
Convenient https://wttr.in wrapper
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
#!/usr/bin/env sh | |
set -e | |
LOCATION="$(echo ${1:-} | sed -e 's/ /%20/g')" | |
curl --get "https://wttr.in/${LOCATION}" | |
exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
${HOME}/bin/wttrin
chmod a+rx ${HOME}/bin/wttrin
${HOME}/bin/
is in${PATH}
.Usage:
wttrin "New York"