|
From: <br...@ph...> - 2006-08-25 21:33:54
|
pau wrote:
>> here. Among other things, it causes each data file to be gunzipped
>> *three* times, instead of twice.
>
> why three? sorry, I think I'm too tired tonight...
Read "help replot".
plot 'foo'
replot 'bar'
is equivalent to
plot 'foo'
plot 'foo', 'bar'
and since you almost certainly don't need the page of output generated
by the single-file 'plot', it's a waste of CPU cycles to gunzip the file
for it.
> I guess I should read the manual...
Drop the "I guess", and replace "should" by "must", and you'll get a
statement closer to the truth.
>> But all of that is a side issue. The real stumbling stone is this
>> question: which of the many programs used by this script: zsh, gnuplot,
>> zcat or gnuplot, will evaluate the $4 in "{TIME=$4}", and all the other
>> $<number> thingies further down the line?
>
> As I said, doing it for a _single_ data file is not problem at all, it just
> works fine... When using the shell script everything is spoiled.
And what does that tell you? That it's the shell that expands that $4.
Why shouldn't it? It expanded $f and $epsfile, too, after all ;-)
Which takes us into the sometimes confusing world of quoting, escaping,
and variable expansion and how exactly the various tools handle them.
The easiest way of avoiding that particular shock would be to rip the
awk stuff out of the gnuplot HERE-script and move it into a stand-alone
awk script.
|