Last active
April 5, 2021 14:48
-
-
Save logcat/7039f38fd67aef358fcd5fe5db5fbb3f to your computer and use it in GitHub Desktop.
wttr.in shell function. source it and use as "weather city"
This file contains 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
function weather() { | |
LANG_BACK=$LANG | |
LANG=uk_UA.UTF-8 | |
curl -s -H "Accept-Language: ${LANG%_*}" "wttr.in/$1" | sed '$ d' | sed '$ d' | |
LANG=$LANG_BACK | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment