Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get the weather in your shell
weather() {
echo Your Location:
curl -s "http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml?query=${@:-YOURZIPCODE}" | perl -ne 's/&amp;deg;/°/g;/<title>([^<]+)/&&printf "%s: ",$1;/<fcttext>([^<]+)/&&print $1,"\n"';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.