Ralf Wildenhues <[EMAIL PROTECTED]> wrote:

> * Jim Meyering wrote on Sat, Apr 05, 2008 at 03:26:28PM CEST:
>> Ralf Wildenhues <[EMAIL PROTECTED]> wrote:
>> > * Jim Meyering wrote on Sat, Apr 05, 2008 at 03:08:24PM CEST:
>> >>
>> >> "pretty portable" may not be enough for autoconf ;-)
>> >
>> > It's very portable.  Really.
>>
>> (curious, not argumentative) How do you know?
>
> Well, I certainly don't have Paul's kind of experience with unixy
> shells, but working on Autoconf makes you absorb all portability
> issue documents on shells you can get your eyes on, and try out all
> suspicious-looking constructs on all shells you can get your fingers
> on.
>
> The fact that redirection works on compound commands with all Bourne
> shell clones is documented indirectly in
> <http://www.in-ulm.de/~mascheck/bourne/common.html>, where Sven mentions

Thanks for looking.

> that a subshell may be created.  (When it comes to traditional shells,
> Sven's pages are the definite reference.)
>
> And I think I have tried this out at some point with several modern
> shells, so I'm pretty confident with those.
>
>> >   for var in $list; do
>> >     $cmds
>> >   done | $cmd
>
>> It's the same concept, sure.  But not the same syntax, and guaranteed
>> not to be the same parser rule in every bourne shell's grammar.
>
> Ah, there you give just enough rope to start nit picking.  There's only
> one Bourne shell.  ;-)

Right <sarcasm> ;-)  We wish.

> And that Bourne shell's source is here:
> <http://minnie.tuhs.org/UnixTree/V7/usr/src/cmd/sh/cmd.c.html> and shows
> quite nicely that compound commands were handled uniformly; go up the
> directory for the rest of the sources, or, for a version compilable on a
> modern system: <http://heirloom.sourceforge.net/sh.html> if you prefer
> trying out to reading the source; but reading is an interesting thing to
> do in itself.

Life is too short :-)

> I suppose you remember those pre-ANSI ways of writing C a
> lot better than I could.  ;-)

Not really.  My memory isn't that good.


Reply via email to