Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Sep 2000 14:44:54 +1100
From:      "Andrew Reilly" <areilly@bigpond.net.au>
To:        Gary Kline <kline@thought.org>
Cc:        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:  <20000915144454.A30136@gurney.reilly.home>
In-Reply-To: <200009150325.e8F3Pns34741@thought.org>; from kline@thought.org on Thu, Sep 14, 2000 at 08:25:48PM -0700
References:  <200009150310.OAA26100@lightning.itga.com.au> <200009150325.e8F3Pns34741@thought.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

-- 
Andrew


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?20000915144454.A30136>