From owner-freebsd-questions Mon May 20 12:15: 9 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 60FCF37B407 for ; Mon, 20 May 2002 12:15:02 -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 MAA71919 for ; Mon, 20 May 2002 12:05:51 -0700 (PDT) Received: (from archie@localhost) by arch20m.dellroad.org (8.11.6/8.11.6) id g4KJ5MM53848 for freebsd-questions@freebsd.org; Mon, 20 May 2002 12:05:22 -0700 (PDT) (envelope-from archie) From: Archie Cobbs Message-Id: <200205201905.g4KJ5MM53848@arch20m.dellroad.org> Subject: sh 'here document' question To: freebsd-questions@freebsd.org Date: Mon, 20 May 2002 12:05:22 -0700 (PDT) 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 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? 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