title: How to determine if string is a substring to another string
body: <p>I'm trying to determine if a substring (a file name) is present in a large string containing many file paths. This is my code which just doesn't work (prints &quot;Does not contain&quot;). I tried comparing with <code>=~</code>, different quotes usages. Nothing from that seems to work. Do you please see a problem in my code?</p>
  <pre><code>#!/bin/bash
  
  text=&quot;/path/to/some/file1-2-3.json /another/path/to/file4-5-6.json&quot;
  my_file=&quot;file1-2-3.json&quot;
  
  if [[ *&quot;$my_file&quot;* == &quot;$text&quot; ]]; then
      echo &quot;Contain&quot;
  else
      echo &quot;Does not contain&quot;
  fi
  </code></pre>