我需要在不同的設備上運行gnuplot腳本。一旦我到達特定目錄,設備上的文件結構是相同的,但這些目錄的路徑不同。我想我需要在路徑名中包含一個變量,以便根據我所在的設備進行更改。gnuplot在文件路徑中有一個變量
我想下面會的工作,because I found something similar here,但它並不:
path_to_directory="/desktop/path/to/directory"
# path_to_directory="laptop/path/to/directory"
# the line above is commented out but it can be included
# if I want to switch from my desktop to my laptop
path_to_file="$path_to_directory/path/to/file"
plot path_to_file ...
一條警告消息說:跳過不可讀文件 「$ path_to_directory /路徑/到/文件」
你知道如何在gnuplot腳本的路徑中包含變量,以便我可以在路徑之間輕鬆切換?
謝謝。