[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: autotools



On Tue 24 Apr 2007 23:27:15 NZST +1200, Thomas Schmitt wrote:

> I read in my man 1 bash:
>   for name [ in word ] ; do list ; done
> Not:
>   for name [ in [ word ] ] ; do list ; done

And not:
    for name [ in word1 word2 ... wordn ] ; do list ; done
yet it works as expected, or in a way to make it useful.

I have no old "authoritative" sh at hand, but a Solaris 2.7 /bin/sh
spits a dummy on an empty item list. I view that as a dumb design (one
would have to enclose for loops in a check for empty item lists), since
corrected.

Agreed that anything wanting to be portable should take this sort of
thing into account. I'd hate to be the one to sort out all the cr*p
shells. Every other sane programming language allows empty loops.

Volker

-- 
Volker Kuhlmann			is list0570 with the domain in header
http://volker.dnsalias.net/	Please do not CC list postings to me.



Reply to: