I am new to gnuplot and I am troubled in passing my argument alot, now I have this simple bash script and a gnuplot script.
in the bash script plot.sh
I should modify my file then send it to the gnuplot script to be plotted OR I can modify my file and just send a parameter (a number passed from another script $1) to the gnuplot script which identifies which file to be plotted, the problem is neither of the two ways is working, I don't seem to get it right! any help?
here's my bash script plot.sh
#!/bin/bash
sed -i 's/ns/;/g' /dev/shm/waitingTime$1.txt
gnuplot -e "filename='/dev/shm/waitingTime$1'" file.gnuplot
And here is my gnuplot script called file.gnuplot
#!/home/yas/file.gnuplot
set xlabel "start"
set ylabel "Delay"
set autoscale
set style line 1 lt 1 lw 3 pt 3 linecolor rgb "red"
plot<"filename"> using 1:2 w points title "tests"
set terminal postscript portrait enhanced mono dashed lw 1 'Helvetica' 14
set output '/dev/shm/TT.pdf'
pause -1
end of file.gnuplot