title: Attempting to loop the following
body: <p>I've been using a simple script to extract information from my .nessus files.</p>
  
  <pre><code>cat blee.nessus | grep -o 'severity="4.*"' | sort --unique | wc -l &amp;&amp; cat blee.nessus | grep -o 'severity="3.*"' | sort --unique | wc -l &amp;&amp; cat blee.nessus | grep -o 'severity="2.*"' | sort --unique | wc -l &amp;&amp; cat blee.nessus | grep -o 'severity="1.*"' | sort --unique | wc -l &amp;&amp; cat blee.nessus | grep cvss_base | tr -d '&lt;cvss_base_score&gt;'| tr -d '/' | paste -sd+ | bc
  </code></pre>
  
  <p>It outputs this:</p>
  
  <pre><code>2
  0
  13
  4
  2237.7
  </code></pre>
  
  <p>I have a directory full of .nessus files.  Is there a way to iterate the commands above onto all the .nessus files and ID which files are being output ie:</p>
  
  <pre><code>blee.nessus
  2
  0
  13
  4
  2237.7
  </code></pre>
  
  <p>I've tried to do something with find . -iname "*.nessus" to execute these commands but can't seem to get the syntax correctly.</p>
  
  <p>Thanks for your help on this,</p>