title: Multiple strings to one string comparison bash
body: <p>I have a <code>shell script</code> like below. It works based on a condition that if <code>$table</code> contains <code>test</code> then executes <code>small.sh</code>, elde <code>big.sh</code>.</p>
  
  <pre><code>if [[ "$table" =~ "test" ]]
  then 
    echo "events"
  else
    echo "history"
  fi
  </code></pre>
  
  <p>Now I want to check if tables contains <code>test</code> , <code>_test_and_results</code> and <code>success</code> in <code>if [[ "$table" =~ "test" ]]</code>.</p>
  
  <p>How can I do that </p>
  
  <p>I have tried like below</p>
  
  <pre><code>if [[ "$table" =~ "test" &amp;&amp; "$table" =~ "success" ]];
  then
      echo "events"
  else
      echo "history"
  fi
  </code></pre>
  
  <p>But when I pass table name <code>abc1_success</code> It is printing <code>history</code> instead of <code>events</code>.</p>
  
  <p>What am I doing wrong here</p>