Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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}
  }


Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: