bug-bash
[Top][All Lists]
Advanced

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

Re: null word list in for loops in bash-2.05.8 not allowed


From: Andreas Schwab
Subject: Re: null word list in for loops in bash-2.05.8 not allowed
Date: 19 Nov 2001 17:33:30 +0100
User-agent: Gnus/5.090003 (Oort Gnus v0.03) Emacs/21.1.30

cpg@rocketmail.com (Carlos Puchol) writes:

|> remember, i am running that from inside a makefile.
|> 
|> bash$ cat Makefile 
|> 
|> SOMETHING =
|> 
|> all:
|>      var='$(SOMETHING)'; for i in $var; do echo "hi: \"$i\""; done

Of course, you need to quote the $ sign so that it is passed to the shell.

        var='$(SOMETHING)'; for i in $$var; do echo "hi: \"$$i\""; done

Andreas.

-- 
Andreas Schwab                                  "And now for something
Andreas.Schwab@suse.de                          completely different."
SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5



reply via email to

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