[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 <prj@po.cwru.edu> wrote:
> Carlos Puchol <cpg@rocketmail.com> wrote:
> > --- Paul Jarc <prj@po.cwru.edu> 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 <cpg@rocketmail.com>
__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com