From: Doug Barton <[EMAIL PROTECTED]>
Subject: Re: empty lists in for
Date: Sun, 05 Mar 2000 11:39:49 -0800
> W Gerald Hicks wrote:
> >
> > > > bash and ksh complain about unexpected ';'.
> > > > /bin/sh (FreeBSD) thinks it's ok and does nothing.
> > > > Which behaviour is more POSIXly correct?
> >
> > >
> > > Neither bash nor ksh claim to be particularly POSIX compliant. our
> > > /bin/sh does. I seem to remember POSIX being ambiguous on this one, but
> > > my books are at the office. If you haven't gotten a more conclusive
> > > answer by Monday, mail me and I'll look it up.
> >
> > I much prefer the current behavior and believe there may be many things
> > which depend on it.
>
> Given that Bash in both standard and POSIX mode complains about 'for i
> in ; do echo $i; done', I would say that it's not POSIX compatible. What
> could/does depend on this behavior "working?"
>
Even though it's my preferred shell, I certainly wouldn't say
that Bash is any sort of standard, certainly not in the POSIX
sense.
Imagine processing a possibly empty list constructed from a
'make' expansion... Without this behavior one would have to
code a guard of some sort around the 'for' construct.
If everything is checked through make release, I would hold
little objection to a change *after* 4.0-RELEASE.
That includes all conditional paths through make release ...
--
Jerry Hicks
[EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message