0
votes

I have a bash script that executes gnuplot:

#!/bin/bash
# some bash scripting here
gnuplot -persist <<EOF
# some gnuplot scripting here
EOF

If the script wa executed I return to the usual terminal input. But what I would like to have is that the gnuplot command prompt stays open such that I can enter gnuplot commands in order to further manipulate the plot.

Is that possible?

1

1 Answers

3
votes

What you could do is put all your gnuplot instructions in a standard text file, instead of a shell script. Then, you can execute this set of instruction in the gnuplot command prompt using:

load 'my_instruction_file.txt'

This way your gnuplot script is executed and you can still add instructions in the prompt.

The bash commands in your original script can be executed from the gnuplot command prompt using the system command :

system "my_bash_instruction"

For instance, you could write all your bash instructions in a script and execute this script from gnuplot.