Skip to content

Instantly share code, notes, and snippets.

@kathawala
kathawala / weather.sh
Created November 26, 2014 09:15
Script to fetch weather data from API
#!/bin/bash
API=
# Set URL for fetching weather information and an Error Msg for invalid input
URL=http://api.wunderground.com/api/$API/geolookup/conditions/q/CA/Stanford.xml
ERR="Error: Arguments expected in form [City] [State]. Ex: weather Palo_Alto CA"
# handles arguments for location / default is Stanford CA
# well-formed argument example: "weather Memphis TN"