The line in my bash script as follows is failing to evaluate multiple OR operators. It's check the first one then moving onif [[ ${SERVER_NAME} != $BITBUCKET || $CONFLUENCE || $CROWD || $JIRA || $JENKINS ]]; thenother code here...fiwith a bash -x on the script I get this;+ [[ crowd.server.com != code.server.com ]]This is the $BITBUCKET variable and $SERVER_NAME is crowd.server.comI need it to evaluate all the variables before moving on
Bash OR operator not evaluating multiple variable
bash
I think you want to check one string on more strings. Do this:if [[ ! $SERVER_NAME =~ ^($BITBUCKET|$CONFLUENCE|$CROWD|$JIRA|$JENKINS)$ ]]; then ...