From owner-freebsd-stable Fri Sep 15 19:25:26 2000 Delivered-To: freebsd-stable@freebsd.org Received: from Awfulhak.org (tun.AwfulHak.org [194.242.139.173]) by hub.freebsd.org (Postfix) with ESMTP id BA69837B423 for ; Fri, 15 Sep 2000 19:25:23 -0700 (PDT) Received: from hak.lan.Awfulhak.org (root@hak.lan.awfulhak.org [172.16.0.12]) by Awfulhak.org (8.11.0/8.11.0) with ESMTP id e8G2Obv29900; Sat, 16 Sep 2000 03:24:37 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.0/8.11.0) with ESMTP id e8G2OYn02088; Sat, 16 Sep 2000 03:24:34 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200009160224.e8G2OYn02088@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.1.1 10/15/1999 To: Dominic Mitchell Cc: Gary Kline , Gregory Bond , Randall Hopper , freebsd-stable@FreeBSD.org, brian@Awfulhak.org Subject: Re: "set -A" Bourne script - a nogo on FreeBSD In-Reply-To: Message from Dominic Mitchell of "Fri, 15 Sep 2000 08:43:58 BST." <20000915084358.B77219@bizboz.mistral.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 16 Sep 2000 03:24:33 +0100 From: Brian Somers Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > $ fn=foo.c ; mv $fn ${fn%.c}.o > > (Ideally I wouldn't need that semicolon there, but it doesn't appear to > work that way). I screwed up with this a little while ago and nearly released some code that did this a=b a=c c=$a echo $c In your case (without the ``;'') the setting of fn is only done in the environment of ``mv'' and not in the shells own environment (not even temporarily). I'm not clear as to whether mine should really print ``b'' or ``c''. It seems that (a)sh and (the real) ksh print ``b'', and bash and pdksh print ``c'' :-/ -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message