From owner-freebsd-stable Thu Sep 14 21:16:21 2000 Delivered-To: freebsd-stable@freebsd.org Received: from gershwin.tera.com (gershwin.tera.com [207.224.230.28]) by hub.freebsd.org (Postfix) with ESMTP id 644E637B422 for ; Thu, 14 Sep 2000 21:16:18 -0700 (PDT) Received: from thought.org (tao.sea.tera.com [207.108.223.55]) by gershwin.tera.com (8.9.3/8.9.3) with ESMTP id VAA06524; Thu, 14 Sep 2000 21:16:15 -0700 (PDT) Received: (from kline@localhost) by thought.org (8.11.0/8.11.0) id e8F4G2B35210; Thu, 14 Sep 2000 21:16:02 -0700 (PDT) (envelope-from kline) Date: Thu, 14 Sep 2000 21:16:02 -0700 From: Gary Kline To: Andrew Reilly Cc: Gary Kline , Gregory Bond , Randall Hopper , freebsd-stable@FreeBSD.ORG Subject: Re: "set -A" Bourne script - a nogo on FreeBSD Message-ID: <20000914211601.B35124@tao.thought.org> References: <200009150310.OAA26100@lightning.itga.com.au> <200009150325.e8F3Pns34741@thought.org> <20000915144454.A30136@gurney.reilly.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <20000915144454.A30136@gurney.reilly.home>; from areilly@bigpond.net.au on Fri, Sep 15, 2000 at 02:44:54PM +1100 X-Organization: Thought Unlimited. Public service Unix since 1986. Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Sep 15, 2000 at 02:44:54PM +1100, Andrew Reilly wrote: > On Thu, Sep 14, 2000 at 08:25:48PM -0700, Gary Kline wrote: > > foo.c to foo.o or simply foo with or without calling > > non-builtin programs? > > Look in man sh(1) for parameter expansion syntax like: > a=foo.c > echo ${a%.c}.o > > There's also %%, # and ## to give smallest or largest matches at > the end or beginning of the string. I think that this is part > of the Posix sh syntax, so you'll probably find it pretty widely > implemented by now. > Something like this was what I seem to recall... but this was waaaaaay back in the early 90's, and with the original (real) Bourne shell. I think this guy used sed and a /tmp/$$ and whatever. I might be remembering the ksh syntax. thanks for the data-point. gary -- Gary D. Kline kline@tao.thought.org Public service Unix To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message