|
From:
<br...@ph...> - 2006-05-22 20:20:25
|
Markus Feldmann wrote: [...] > The filename of my batch file may be for example "aufg11.batch". > > In this batch file i wanna use a file which has got values. > The name of this file is "aufg11.dat". > > I don't want to, > plot "aufg11.dat" ... > but i want to, > plot "$filename" > or something like this. Sorry, no can do. Not with a filename that was used to run gnuplot on, like that, anyway. You can refer to environment variables, though, if your platform is sufficiently Unix-like to support command substitution: plot "`echo $FILE`.dat" Or even move the entire scripting job off gnuplot's shoulders onto that of the shell, by using a "HERE" script: gnuplot -persist <<\EOF plot "$1.dat" EOF or the somewhat simpler echo plot "$1.dat" | gnuplot -persist |