12 ms·
As a quick aside, you can set default variables in bash with ${var-default}, so your function can be condensed to: weather() { curl http://wttr.in/${1-
by Tiksi 11y ago
As a quick aside, you can set default variables in bash with ${var-default}, so your function can be condensed to:
weather()
{
curl http://wttr.in/${1-$WEATHER_CITY}
}