|
From: Juergen W. <wie...@fr...> - 2004-10-16 11:00:33
|
Petr Mikulik wrote:
> I though that instead of using
> a=`runme`
> there would be an alternative with macro expansion:
> a=command('runme')
Yes, yes, I'd love that. The variable "a" contains a string
afterwards, doesn't it?
Currently, I'm trying to extract some information from comments in
datafiles. The crucial thing is that information is to be passes
from gnuplot to the script and vice versa. I need something like
gawkcall = sprintf("gawk -f getname %i %s", this_index, filename)
name = execute(gawkcall)
For numerical values, you can already do this with
getvalcall = sprintf("getval %i %s", this_index, filename)
value = `@getvalcall`
but something like
gawkcall = sprintf("gawk -f getval %i %s", this_index, filename)
value = atof(execute(gawkcall))
or
value = 0 + execute(gawkcall)
is cleaner, I think.
Juergen
|