title: Using multiple variables while loop bash
body: <p>Looking for some help on writing a bash script with command that call multiple variables where each variable contains list of text that needs file to run against</p>
  
  <p>Here is my example.</p>
  
  <p>file1.txt:</p>
  
  <pre><code>USA
  EU
  Asia
  SouthAmerica
  </code></pre>
  
  <p>file2.txt:</p>
  
  <pre><code>user1
  user2
  user3
  user4
  </code></pre>
  
  <p><b></b></p>
  
  <pre><code>var1=$(cat file1.txt)
  var2=$(cat file2.txt)
  
  echo $var1
  USA EU Asia SouthAmerica
  
  echo $var2
  user1 user2 user3 user4
  </code></pre>
  
  <p>What I need is for </p>
  
  <pre><code>while read var1 var2;
  do
     *command* --region $var1 --profile $var2 *do something*;
  
  done | tee -a $var2.txt
  </code></pre>
  
  <p>How can I get the one command to iterate through contents of <code>var1</code> and <code>var2</code> to produce the results I need?</p>