Bash 执行脚本后保持gnuplot打开

Bash 执行脚本后保持gnuplot打开,bash,gnuplot,Bash,Gnuplot,我有一个执行gnuplot的bash脚本: #!/bin/bash # some bash scripting here gnuplot -persist <<EOF # some gnuplot scripting here EOF #/bin/bash #这里有一些bash脚本 gnuplot-persist您可以将所有的gnuplot指令放在一个标准文本文件中,而不是放在一个shell脚本中。然后,您可以使用以下命令在gnuplot命令提示符中执行这组指令: load 'my

我有一个执行gnuplot的bash脚本:

#!/bin/bash
# some bash scripting here
gnuplot -persist <<EOF
# some gnuplot scripting here
EOF
#/bin/bash
#这里有一些bash脚本

gnuplot-persist您可以将所有的gnuplot指令放在一个标准文本文件中,而不是放在一个shell脚本中。然后,您可以使用以下命令在gnuplot命令提示符中执行这组指令:

load 'my_instruction_file.txt'
通过这种方式执行gnuplot脚本,您仍然可以在提示符中添加指令

原始脚本中的bash命令可以使用
system
命令从gnuplot命令提示符执行:

system "my_bash_instruction"

例如,您可以将所有bash指令编写在一个脚本中,并从gnuplot执行此脚本。

您可以将所有gnuplot指令放在一个标准文本文件中,而不是放在一个shell脚本中。然后,您可以使用以下命令在gnuplot命令提示符中执行这组指令:

load 'my_instruction_file.txt'
通过这种方式执行gnuplot脚本,您仍然可以在提示符中添加指令

原始脚本中的bash命令可以使用
system
命令从gnuplot命令提示符执行:

system "my_bash_instruction"

例如,您可以在一个脚本中编写所有bash指令,然后从gnuplot执行此脚本。

是的,但是我不能在一个脚本中执行gnuplot命令之前执行bash命令。对,我错过了。Gnuplot有一个
system
命令,可以调用shell指令。我编辑了我的答案以包含它。是的,但是我不能在gnuplot命令之前在一个脚本中执行bash命令。对,我错过了。Gnuplot有一个
system
命令,可以调用shell指令。我编辑了我的答案,将其包括在内。