Consultar desde la terminal el tiempo de una determinada ciudad

Agregar por ejemplo a /etc/bash.bashrc o /etc/.bashrc o $HOME/.bashrc.

tiempo(){ curl -s "http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml?query=${@:-<YOURZIPORLOCATION>}"|perl -ne '/<title>([^<]+)/&&printf "%s: ",$1;/<fcttext>([^<]+)/&&print $1,"\n"';}

Ejemplo de consulta sobre Madrid.

$ tiempo Madrid

Tonight: Clear. Lows around 29. Patchy frost after midnight. North winds around 5 mph. 
Saturday: Mostly sunny. Highs around 58. East winds around 5 mph. 
Saturday Night: Mostly clear. Lows around 39. East winds around 5 mph. 
Sunday: Partly cloudy in the morning then becoming mostly cloudy. A 20 percent chance of showers. Highs around 67. Southeast winds around 10 mph. 
Sunday Night: Warmer. Showers and isolated thunderstorms. Lows around 55. South winds around 5 mph. Chance of rain 90 percent.