* Stefano Lattarini wrote on Sun, Aug 08, 2010 at 06:06:04PM CEST: > At Sunday 08 August 2010, Ralf Wildenhues wrote: > > No. You save a fork with > > > > foo () > > { > > ... > > foo_result=bar > > } > > > > foo ARG... > > test "$foo_result" = ... > > > Yes, but how do you get foo_result in our case? ;-)
With sed, of course. > > which we've been doing a lot in Libtool and Autoconf lately. > Yes, but using XSI variable substitutions and shell arithmetic, not > complex sed scripts. That's not what I meant. We are using more than one strategy to speed up things. > Or am I missing something? I think you are. You proposed result=`foo ...` test "$result" = ... which is an extra fork over the above, regardless of what foo does internally. Cheers, Ralf