gnuplot may be executed in either batch or interactive modes, and the two
may even be mixed together on many systems.
Any command-line arguments are assumed to be names of files containing
gnuplot commands (with the exception of standard X11 arguments, which are
processed first). Each file is loaded with the
load command, in the order
gnuplot exits after the last file is processed. When no load
files are named,
gnuplot enters into an interactive mode. The special
filename "-" is used to denote standard input.
quit commands terminate the current command file and
load the next one, until all have been processed.
To launch an interactive session:
To launch a batch session using two command files "input1" and "input2":
gnuplot input1 input2
To launch an interactive session after an initialization file "header" and followed by another command file "trailer":
gnuplot header - trailer