title: Using a bash script to apply another script to every file in a directory like a matrix
body: <p>Let's say in my directory I have five files.</p>
  
  <p>Files: 1,2,3,4, &amp; 5</p>
  
  <p>I have a script that will do a mathematical process to compare two files and I want to use this script on every file in the directory, example below.</p>
  
  <p>compare file 1 to 2,3,4, &amp; 5</p>
  
  <p>compare file 2 to 3,4, &amp; 5</p>
  
  <p>compare file 3 to 4 &amp; 5</p>
  
  <p>compare file 4 to 5</p>
  
  <p>The files follow this name scheme filename_V0001.txt </p>
  
  <p>How can a write a simple bash script to do this?</p>