autoconf
[Top][All Lists]
Advanced

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

Re: empty `for' loop in shell


From: Keith MARSHALL
Subject: Re: empty `for' loop in shell
Date: Mon, 24 Oct 2005 16:13:15 +0100

Stepan Kasal wrote:
>  is it true that
>
>        a= ; for f in $a; do ... done
>
> is not interpreted correctly by some shells?

There was some discussion on a related problem, on one of the
MinGW fora, a couple of months back.  In a *Makefile*

  LIST =

  some-target:
        for i in ${LIST}; \
        do \
          some commands; \
        done

doesn't work; a possible workaround is to say

  for i in ""${LIST};

But, that's a subtly different problem -- your example works fine
for me in bash, and in SunOS 5.5 sh.

Regards,
Keith.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]