title: Can I use the same variable name in bash for multiple parallel background processes?
body: <p>In the shell script below, I would like to run 2 commands parallel in the background to speed up the process, wait for them to finish and continue to run some more commands afterwards.</p>
  
  <p>As I am using the same variable name (DATASERVERNAME) in both loops, are these variables going to interfere with each other in the background? Should I use different variable names, like DATASERVERNAME_SYBASE, DATASERVERNAME_ORACLE in each loop instead?</p>
  
  <pre><code>#!/bin/bash
  while read DATASERVERNAME
  do
    some commands here
  done &lt; sybase_data_servers.txt &amp;
  
  while read DATASERVERNAME
  do
    some commands here
  done &lt; oracle_data_servers.txt &amp;
  
  wait
  
  some more commands here
  </code></pre>