Hy, I want to read from txt file (what is contain only one word) ...and use it as variable (as a string) in gnuplot. HOw can I make it?
On Sunday, 12 March 2017 10:08:02 PM artiny sixtee wrote:
VAR = "cat textfile"
cat textfile
Thank you for answer.
I dont know why but didnt work for me.... the lastPatch.txt contain this text: x.png
I tried this: VAR = "cat lastPatch.txt"
but this command make new textfile with name: cat lastPatch.txt and contain some undefined symbols: ‰PNG
You have to use backtics, not double quotes. See
help backquotes
I tried this: VAR = ’cat lastPatch.txt’
result: create new textfile "cat lastPatch.txt" with undefined symbols: ‰PNG
Backquotes, not single quotes. Like in
var = "`cat file.txt`"
Or try
var = system("cat file.txt")
thank you :) now working var = system("cat file.txt")
Log in to post a comment.
Hy,
I want to read from txt file (what is contain only one word) ...and use it as variable (as a string) in gnuplot. HOw can I make it?
On Sunday, 12 March 2017 10:08:02 PM artiny sixtee wrote:
VAR = "
cat textfile
"Thank you for answer.
I dont know why but didnt work for me....
the lastPatch.txt contain this text:
x.png
I tried this:
VAR = "cat lastPatch.txt"
but this command make new textfile with name:
cat lastPatch.txt
and contain some undefined symbols:
‰PNG
You have to use backtics, not double quotes. See
I tried this:
VAR = ’cat lastPatch.txt’
result:
create new textfile "cat lastPatch.txt" with undefined symbols:
‰PNG
Last edit: artiny sixtee 2017-03-13
Backquotes, not single quotes. Like in
Or try
thank you :) now working
var = system("cat file.txt")