title: Bash script to iterate over files recursively and use matches from regex
body: <p>I have a directory that contains many sub-directories. Inside all these sub-folders we have *.yml files.</p>
  
  <p>The files names are something like:</p>
  
  <pre><code>file-name-daily-1.yml
  file-name-daily-2.yml
  file-name-weekly-1.yml
  file-name-weekly-2.yml
  file-name-monthly-1.yml
  </code></pre>
  
  <p>Inside each file there is a line like:</p>
  
  <pre><code>- name: Some line of text here
  </code></pre>
  
  <p>I have a command that looks like:<br></p>
  
  <pre><code>node index.js --epr --run "[my matched string]" -p $D -p $F -p $T
  </code></pre>
  
  <p>I would need a bash script that will recursively search the directories for files containing a keyword (daily, weekly, monthly, 1, 2, etc.) and then grab the text following the ":" inside the matched files. I would then need to run my command against each match.</p>
  
  <p>How would this great community go about doing such a task?</p>