how to send a customized string to linux command in gnuplot
Jon <[email protected]>
| Newsgroups | gmane.comp.graphics.gnuplot.user |
|---|---|
| Message-ID | <CALx0QV6t__9kNjp0pFUcPuU21c5qkycCsTd6qOqJNb2sJbWdQQ@mail.gmail.com> |
Hi,
I need to extract a value from each file and combine a column in that
file and then plot. The gnuplot script looks something like
reset; set macro
list="2.35 2.4 2.5 2.6 2.7 "
do for [i in list]{
file="/dir/to/".i."/target/file"
cmd="head -n 6 ".@file." | tail -n 1 | awk '{printf $4}'"
print file
print cmd
ef=system(@cmd)
print ef
plot @file u ($1-ef):2 ev ::7::301 w l ti i
}
The expected screen output is, say,
/dir/to/2.35/target/file
head -n 6 /dir/to/2.35/target/file | tail -n 1 | awk '{printf $4}'
3.243 (some intended value coming out of linux command, differing at each i)
the intended plot with x axis shifted 3.243
The execution failed complaining "invalid expression"
Why is the error message? Is this possibly done with gnuplot? I am
using gnuplot 5.2.6 on linux mint 8.1 installed in a virtualbox hosted
with windows 7
Thanks for your help!
Sincerely,
John
_______________________________________________
gnuplot-info mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info