|
From: Thomas S. <t.s...@fz...> - 2011-03-30 10:49:20
|
does
set macro
source = "/path/file.dat"
scaledata1 = `awk '/Total/ {print $4}' @source`
work?
atoms.h wrote:
>
> Hey guy,
>
> I'm trying to integrate shell commands to a gnuplot script. Partly it
> works to the point that I can get values from a shell command to a gnuplot
> variable like this:
>
> scaledata1 = `echo $(awk '/Total/ {print $4}' /path/file.dat)`
>
> Now scaledata1 in gnuplot has the value awk was looking for in file.dat.
> That's great! But what I would like to do is define /path/file.dat as a
> variable in gnuplot and use is in that argument like:
>
> source = "/path/file.dat"
> scaledata1 = `echo $(awk '/Total/ {print $4}' source)`
>
> However, this doesn't work. Also I tried @source.
>
> Any ideas are much appreciated!
> Thomas
>
--
View this message in context: http://old.nabble.com/passing-arguments-to-shell-and-back-from-gnuplot-tp31274799p31275924.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|