Date: Mon, 20 May 2002 12:43:24 -0700 (PDT) From: Archie Cobbs <archie@dellroad.org> To: Matthias Buelow <mkb@informatik.uni-wuerzburg.de> Cc: Archie Cobbs <archie@dellroad.org>, freebsd-questions@freebsd.org Subject: Re: sh 'here document' question Message-ID: <200205201943.g4KJhOf54005@arch20m.dellroad.org> In-Reply-To: <20020520194021.GC38186@reiher.informatik.uni-wuerzburg> "from Matthias Buelow at May 20, 2002 09:40:21 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Matthias Buelow writes:
> >Is this supposed to work? It doesn't.
> >
> > $ cat foo.sh
> > PREFIX=foo
> > SUFFIX=bar
> > . << xxxEOFxxx
> > ${PREFIX}${SUFFIX}=abc
> > xxxEOFxxx
> > echo foobar=${foobar}
> > $ sh foo.sh
> > foobar=
> > $
> >
> >This is FreeBSD 4.5-REL. If you write the '${PREFIX}${SUFFIX}=abc'
> >to a file and then input that file using '.' then it does work.
> >So why the difference?
>
> What gives you the idea that the "." builtin parses input from stdin?
> It surely is only documented as having a file argument, which it
> reads and parses.
Ah, that explains it.. thanks :-)
-Archie
__________________________________________________________________________
Archie Cobbs * Packet Design * http://www.packetdesign.com
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205201943.g4KJhOf54005>
