CarloG wrote:
My main purpose is to exploit as data source a different file each time I invoke gnuplot from a script.
I would like to provide the source file name as a parameter.
For example:
gnuplot my_gnuplot_file data_source_filename
If it is not possible,
I would like to read from gnuplot the content of a text file where the filename is stored,
e.g., assigning to a variable the output of a cat/awk invocation.
Have your 'gnuplot_script' contain $1 to represent the file to be read e.g.
reset
set title "$1 Prices"
set datafile separator ","
set xdata time
set timefmt "%d/%m/%Y"
set grid
plot "$1" using 1:2:3:4:5 notitle with candlesticks lt 7
and then, for example, on the command line type
call 'gnuplot_script' $Gold
which will insert Gold into the script in place of $1 and hence plot the Gold file.