Date: Mon, 20 May 2002 21:40:21 +0200 From: Matthias Buelow <mkb@informatik.uni-wuerzburg.de> To: Archie Cobbs <archie@dellroad.org> Cc: freebsd-questions@freebsd.org Subject: Re: sh 'here document' question Message-ID: <20020520194021.GC38186@reiher.informatik.uni-wuerzburg> In-Reply-To: <200205201905.g4KJ5MM53848@arch20m.dellroad.org> References: <200205201905.g4KJ5MM53848@arch20m.dellroad.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Archie Cobbs 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.
--mkb
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?20020520194021.GC38186>
