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: Carlos Puchol
Subject: Re: null word list in for loops in bash-2.05.8 not allowed
Date: Mon, 19 Nov 2001 07:28:20 -0800 (PST)

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

bash$ make
var=''; for i in ar; do echo "hi: \"\""; done
hi: ""
bash$ 



--- Paul Jarc <address@hidden> wrote:
> Carlos Puchol <address@hidden> wrote:
> > --- Paul Jarc <address@hidden> wrote:
> >> Assuming SOMETHING doesn't contain single quotes:
> >> var='$(SOMETHING)'; for i in $var; do ...; done
> >
> > does not work. the loop is issued once, with $i
> > having the empty string.
> 
> No, that would happen if $var were double-quoted.  But it isn't.
> 
> 
> paul


=====
C. Puchol <address@hidden>

__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com



reply via email to

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