title: Using awk/find to output result and file name
body: <p>Example data in three files.</p>
  
  <p><strong>fileOne.txt</strong></p>
  
  <pre><code>YYY &gt;&gt;
   yyy one
   yyy two
   yyy three
  &lt;&lt;
  
  ZZZ &gt;&gt;
   zzz one
   zzz two
   zzz three
  &lt;&lt;
  </code></pre>
  
  <p><strong>fileTwo.txt</strong></p>
  
  <pre><code>XXX &gt;&gt;
   xxx one
   xxx two
   xxx three
  &lt;&lt;
  </code></pre>
  
  <p><strong>fileThree.txt</strong></p>
  
  <pre><code>XXX &gt;&gt;
   xxx one
   xxx two
   xxx three
  &lt;&lt;
  
  ZZZ &gt;&gt;
   zzz one
   zzz two
   zzz three
  &lt;&lt;
  </code></pre>
  
  <p>I am using awk to output portions of the file between start delimiter (<strong>XXX</strong>) and end delimiter (<strong>&lt;&lt;</strong>). This works:</p>
  
  <pre><code>awk '/XXX/,/&lt;&lt;/' /d/Temp/temp/*.txt
  </code></pre>
  
  <p><strong>Results</strong></p>
  
  <pre><code>XXX &gt;&gt;
   xxx one
   xxx two
   xxx three
  &lt;&lt;
  XXX &gt;&gt;
   xxx one
   xxx two
   xxx three
  &lt;&lt;
  </code></pre>
  
  <p>But I want to output the file names too. Find sort of works, but it ends out printing <strong>all</strong> the file names.</p>
  
  <pre><code>find /d/Temp/temp/ -type f -name "*.txt" -print -exec awk '/XXX/,/&lt;&lt;/' {} \;
  </code></pre>
  
  <p><strong>Results</strong></p>
  
  <pre><code>/d/Temp/temp/fileOne.txt
  /d/Temp/temp/fileThree.txt
  XXX &gt;&gt;
   xxx one
   xxx two
   xxx three
  &lt;&lt;
  /d/Temp/temp/fileTwo.txt
  XXX &gt;&gt;
   xxx one
   xxx two
   xxx three
  &lt;&lt;
  </code></pre>
  
  <p>How can I modify this command to only output the matched file names?</p>