title: Bash shell scripting to update filenames in loop
body: <p>I have to create a shell script to execute the following.</p>
  
  <pre><code>for file in /dir
  do
      somecommand $file /newdir/outputname.txt
  done
  </code></pre>
  
  <p>My problem is for each loop I have to give new name for "outputname.txt' , like 'output1.txt' in loop1 , 'output2.txt' in loop2 and so on. How to do that ?
  Any help would be appreciated</p>