From owner-freebsd-questions Mon May 20 13: 0:21 2002 Delivered-To: freebsd-questions@freebsd.org Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by hub.freebsd.org (Postfix) with ESMTP id 1D10137B404 for ; Mon, 20 May 2002 13:00:04 -0700 (PDT) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id MAA72122; Mon, 20 May 2002 12:43:53 -0700 (PDT) Received: (from archie@localhost) by arch20m.dellroad.org (8.11.6/8.11.6) id g4KJhOf54005; Mon, 20 May 2002 12:43:24 -0700 (PDT) (envelope-from archie) From: Archie Cobbs Message-Id: <200205201943.g4KJhOf54005@arch20m.dellroad.org> Subject: Re: sh 'here document' question In-Reply-To: <20020520194021.GC38186@reiher.informatik.uni-wuerzburg> "from Matthias Buelow at May 20, 2002 09:40:21 pm" To: Matthias Buelow Date: Mon, 20 May 2002 12:43:24 -0700 (PDT) Cc: Archie Cobbs , freebsd-questions@freebsd.org X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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