How do I accomplish something like the following in Bash?
if ("$a" == "something" || ($n == 2 && "$b" == "something_else")); then
...
fi
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You almost got it:
In fact, the parentheses can be left out because of operator precedence, so it might also be written as