title: Variable is not recognized when called using sed in Gnuplot
body: <p>I'm having a problem when i call a variable defined in gnuplot while using sed:</p>
  
  <p>pi.plt</p>
  
  <pre><code>N= 10000
  set term gif animate delay 80
  set output "pi.gif"
  j = 1
  load 'pi2.plt'
  </code></pre>
  
  <p>pi2.pĺt</p>
  
  <pre><code>k = ` sed -n "$j p" pi.dat | cut -f3 -d ' ' `
  set label 1 sprintf('Pi = %f', k) at graph 0.85, 0.85
  set parametric
  plot fx(t), fy(t), "pi.dat" every ::::j using 1:2 with points
  j = j + 100
  if (j &lt; N+1) reread
  </code></pre>
  
  <p>The variable j, although is defined in gnuplot, is not recognized by sed and i keep getting the error "invalid command".
  Can anyone help me solving this issue? Thanks in advance!</p>