Subject: Re: "for" behaviour in /bin/sh
To: None <current-users@NetBSD.ORG>
From: Wolfgang Solfrank <ws@tools.de>
List: current-users
Date: 07/13/1998 19:10:52
>   BTW: one place that this notation occurs is in automake generated makefiles
> if you have "no" SUBDIRS. I.e:
> 	SUBDIRS=
> 
>   if you omit the variable, then automake doesn't produce the for loop at
> all.

Note that there is a difference between:

	for i in
	do
		...
	done

and:
	LIST=
	for in in $LIST
	do
		...
	done

The former will not work on "traditional" shells (like e.g. Suns), but the
latter does indeed work as expected.

So one might argue that the fact that our /bin/sh accepts the former is a bug,
but I doubt that any spec has anything to say about it.

Ciao,
Wolfgang
-- 
ws@TooLs.DE     (Wolfgang Solfrank, TooLs GmbH) 	+49-228-985800