• 0 Posts
  • 3 Comments
Joined 2 years ago
cake
Cake day: September 16th, 2023

help-circle
  • You’re probably wanting [ -z "${VAR1}" -a -z "${VAR2}" ]. Note in bash that there are minor differences in how [ ] and [[ ]] tests are handled. You can pull up a handy cheat sheet of the operands on most distros by running man test, though you’ll need to read through the CONDITIONAL EXPRESSIONS section of man bash if you want to see the minor differences of the single vs double square bracket commands (mostly whether locale applies to string order, as well as whether operands are evaluated in numeric comparisons).