title: Bash: Look for files in certain folders and then create output lists
body: <p>I'm new to Bash, and I'm trying to find files in a certain set of folders. I want to create a txt report for image files in each /check/ folder.</p>
  
  <p>Here's what I've been working with:</p>
  
  <pre><code># Find images
  for f in */check/ ; do
      find ./ -iname "*jpg*" -o -iname "*png*" &gt; find_images.txt
          echo "finished $f"
  done
  </code></pre>
  
  <p>I can't figure out how to only look at subfolders named "check", and I also want to pass the variable so that I get separate text files named after the parent folders. Any suggestions?</p>