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

You can also solve that problem with double square brackets:

  [[ "$foo" = 1 && "$bar" = 2 ]]


Really, we should be using double square brackets. We're not aiming for POSIX compliance and double square solves a lot of problems.




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

Search: