title: Linux - Check if string is in list
body: <p>I have a bash script and I want to check if a string is in a list. 
  Like: string = "Hello World!", List=("foo", "bar").
  Python example:</p>
  
  <pre><code>if name in list: # Another way -&gt; if name in ["foo", "bar"]
    # work to do
  else:
    sys.exit(1)
  </code></pre>
  
  <p>Thank you!</p>