Date: Thu, 14 Sep 2000 21:16:02 -0700 From: Gary Kline <kline@thought.org> To: Andrew Reilly <areilly@bigpond.net.au> Cc: Gary Kline <kline@thought.org>, Gregory Bond <gnb@itga.com.au>, Randall Hopper <aa8vb@nc.rr.com>, freebsd-stable@FreeBSD.ORG Subject: Re: "set -A" Bourne script - a nogo on FreeBSD Message-ID: <20000914211601.B35124@tao.thought.org> In-Reply-To: <20000915144454.A30136@gurney.reilly.home>; from areilly@bigpond.net.au on Fri, Sep 15, 2000 at 02:44:54PM %2B1100 References: <200009150310.OAA26100@lightning.itga.com.au> <200009150325.e8F3Pns34741@thought.org> <20000915144454.A30136@gurney.reilly.home>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000914211601.B35124>
