在我的bash腳本中,我在開始gnuplot腳本之前執行了一系列操作。我的bash腳本是這樣的:在bash環境中將命令從另一個文件插入gnuplot腳本
#!/bin/bash -e
# Do some bash operations here
# Create a file containing a list of Gnuplot commands called arrow_coords
# All the commands are the same: just drawing a group of arrows
# Every line in "arrow_coords" looks like this:
# set arrow from -500,-100 to 500,-100 as 1
# There are hundreds of those line commands
# Entering Gnuplot script
gnuplot <<- EOF
reset
set terminal pngcairo transparent nocrop enhanced font '$font_type, 22' size 1800,1800
set output "$output_file"
set yrange [-1:18]
set xrange [-1:18]
? <----------------------------------- HOW TO INSERT COMMANDS FROM ANOTHER FILE?
plot '$dat_file' using 1:2 with points ls 1
EOF
我無法找到一個方法來插入寫在arrow_coords進入gnuplot的腳本,我在我的bash文件中的命令。這可能嗎?對於我想要做的事情,還有其他建議嗎?
工作就像魅力!謝謝。 – Theo
不客氣。我很驚訝你使用bash並沒有遇到背景操作員! – Kenney
我從來沒有用過它。我使用bash來開發相當簡單的腳本。所以我仍然是這方面的初學者;) – Theo