Bryan Yamashiro - 2016-06-02

Hello there,

I am currently using a bash shell script that takes an argument invoked by ./Test.sh 201103

Bash script gnuplot call:
gnuplot -e "call 'flux.plt' ${1}"

To call in the argument, which when I print ARG1 using my .plt file, it indeed prints 201103 on my terminal, therefore I assume that it is calling in correctly, but is there a way to append the argument to my plot function?

The goal is to append the argument infront of the Behind.1m
plot "Behind.1m" using 1:23 title '60.0 MeV' lw 1 lc rgb "orange" with lines

To look like:
plot "201103Behind.1m" using 1:23 title '60.0 MeV' lw 1 lc rgb "orange" with lines

I've tried:
"<ARG1>Behind.1m" using 1:23 title '60.0 MeV' lw 1 lc rgb "orange" with lines
"<string>Behind.1m" using 1:23 title '60.0 MeV' lw 1 lc rgb "orange" with lines
string = printf(ARG1)
"'ARG1'Behind.1m" using 1:23 title '60.0 MeV' lw 1 lc rgb "orange" with lines
"{ARG1}Behind.1m" using 1:23 title '60.0 MeV' lw 1 lc rgb "orange" with lines

Please let me know if you need more information, and thank you for the help.

 

Last edit: Bryan Yamashiro 2016-06-02