Hacker News new | ask | show | jobs
by michaelhoffman 5017 days ago
You can also solve that problem with double square brackets:

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

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