title: Does the following .sh script qualify to be processed parallely?
body: <p>So I generated the compiled executable of a matlab script using -mcc command to be able to run the executable using unix environment so as to not query the matlab license server. I believe the executable doesn't require license requirements.</p>
  <p>To see if what I am trying to do is along the right lines, I tried doing what I want to for a toy matlab script(Called sineplot).</p>
  <p>In the image attached, the script calls the mcc generated sineplot.sh thousand times. I am also passing two input arguments to the script which are as follows:-</p>
  <ol>
  <li><strong>Loop Count:</strong> Basically the matlab script loads a .mat file which contains a 1*1000 array.
  Depending on the loop count, a distinct value from the array is picked for different
  amplitude sine wave. That is why the loop count information is being passed.</li>
  <li><strong>File Name:</strong> To save the output of each count, I am passing a different file name for each count.</li>
  </ol>
  <p>Being fairly new to all of this, I have a question: If I submit this script to be run parallelly in different machines(using the LSF), will the different runs be all executed parallelly? Is the script potent enough to do that? Or something else needs to be done too.</p>
  <p><a href="https://i.stack.imgur.com/RS10R.png" rel="nofollow noreferrer">Script invoking mcc generated .sh file</a></p>
  <p>Script:</p>
  <pre class="lang-sh prettyprint-override"><code>!#/bin/bash
  
  echo &quot;This script is about to call another script&quot;
  
  lc=1
  
  while [ lc -le 1000]
  
  do
  
  sh ~/run/sine_plot.sh /apps/mathworks/matlab/R2018a $lc,out$lc.mat
  
  lc=$(($lc+1))
  
  done
  
  echo &quot;Another script called&quot;
  </code></pre>