Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Sep 2000 03:24:33 +0100
From:      Brian Somers <brian@Awfulhak.org>
To:        Dominic Mitchell <hdm@mistral.co.uk>
Cc:        Gary Kline <kline@thought.org>, Gregory Bond <gnb@itga.com.au>, Randall Hopper <aa8vb@nc.rr.com>, freebsd-stable@FreeBSD.org, brian@Awfulhak.org
Subject:   Re: "set -A" Bourne script - a nogo on FreeBSD 
Message-ID:  <200009160224.e8G2OYn02088@hak.lan.Awfulhak.org>
In-Reply-To: Message from Dominic Mitchell <hdm@mistral.co.uk>  of "Fri, 15 Sep 2000 08:43:58 BST." <20000915084358.B77219@bizboz.mistral.co.uk> 

next in thread | previous in thread | raw e-mail | index | archive | help
> $ 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 <brian@Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
      <http://www.Awfulhak.org>;                   <brian@[uk.]OpenBSD.org>
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009160224.e8G2OYn02088>