title: Finding in directories that start with "go" but not directories with names that contain "work" or "play"
body: <p>I wrote a script that doesn't really work great and could use some pointers.</p>
  <pre><code>find /mnt/{bob1, bob2, bob3, john1, john2, john3, tony1, tony2, tony3}*/go* -type f -not -path &quot;*/*work*/*&quot; -not -path &quot;*/*play*/*&quot; \( -iname &quot;*.ado&quot; -o -iname &quot;*.do&quot; -o -iname &quot;*.pl&quot; -o -iname &quot;*.py&quot; -o -iname &quot;*.R&quot; -o -iname &quot;*.include&quot; -o -iname &quot;*.sas&quot; -o -iname &quot;*.dct&quot; \) &gt;&gt; /mnt/home/found_programs.txt
  </code></pre>
  <p>Just to make it easier to read:</p>
  <pre><code>find /mnt/{bob1, bob2, bob3, john1, john2, john3, tony1, tony2, tony3}*/go* 
      -type f 
      -not -path &quot;*/*work*/*&quot; 
      -not -path &quot;*/*play*/*&quot; 
      \(   -iname &quot;*.ado&quot; 
        -o -iname &quot;*.do&quot; 
        -o -iname &quot;*.pl&quot; 
        -o -iname &quot;*.py&quot; 
        -o -iname &quot;*.R&quot; 
        -o -iname &quot;*.include&quot; 
        -o -iname &quot;*.sas&quot; 
        -o -iname &quot;*.dct&quot; \) &gt;&gt; /mnt/home/found_programs.txt
  </code></pre>
  <p>I need this to write the names of all files with the extensions above that are listed in any directory that starts with &quot;go&quot;, but can't have &quot;work&quot; or &quot;play&quot; in the directory name. Trying to do this for work and I can't quite get it to work.</p>
  <p>Actual paths and file names have been changed for reasons</p>