title: Using variables from shell script for gnuplot
body: <p>I try to plot several curves on a same plot using variables from a shell script. My problem is that I do not succeed in collecting the variables and use them in gnuplot.</p>
  <p>Here is my code:</p>
  <pre><code>#!/bin/bash
  
  for elem in AMD WALE SIM;
  do
    echo $elem
    Utau_$elem=$(awk 'FNR==5{print $1}' file_$elem)
  done
  gnuplot -persist  &lt;&lt;-EOFMarker
  list= &quot;AMD WALE SIM&quot;
  plot for [i in list] &quot;stat_&quot;.i u 1:($1/Utau_.i) @ title_i  
  EOFMarker
  </code></pre>
  <p>This script aim at avoiding to write all the plot sentences but should have the same effect that the following :</p>
  <pre><code> plot &quot;stat_AMD&quot; u 1:($1/Utau_AMD}) @title_AMD,\
  &quot;stat_WALE&quot; u 1:($1/Utau_WALE}) @title_WALE,\
  &quot;stat_SIM&quot; u 1:($1/Utau_SIM})  @title_SIM
  </code></pre>
  <p>I did not succeed in plotting anything and I am not sure that the link can be done between the value Utau_$elem for the bash script and Utau_.i from the gnuplot script. Does someone have an idea if it is possible and how can I code it ?</p>
  <p>Thanks a lot !</p>