From owner-freebsd-stable Fri Sep 15 3:19:55 2000 Delivered-To: freebsd-stable@freebsd.org Received: from sr14.nsw-remote.bigpond.net.au (sr14.nsw-remote.bigpond.net.au [24.192.3.29]) by hub.freebsd.org (Postfix) with ESMTP id 50B9937B43C for ; Fri, 15 Sep 2000 03:19:46 -0700 (PDT) Received: from areilly.bpc-users.org (CPE-144-132-245-92.nsw.bigpond.net.au [144.132.245.92]) by sr14.nsw-remote.bigpond.net.au (Pro-8.9.3/8.9.3) with SMTP id OAA06594 for ; Fri, 15 Sep 2000 14:44:55 +1100 (EDT) Received: (qmail 30879 invoked by uid 1000); 15 Sep 2000 03:44:54 -0000 From: "Andrew Reilly" Date: Fri, 15 Sep 2000 14:44:54 +1100 To: Gary Kline Cc: Gregory Bond , Randall Hopper , freebsd-stable@FreeBSD.ORG Subject: Re: "set -A" Bourne script - a nogo on FreeBSD Message-ID: <20000915144454.A30136@gurney.reilly.home> References: <200009150310.OAA26100@lightning.itga.com.au> <200009150325.e8F3Pns34741@thought.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200009150325.e8F3Pns34741@thought.org>; from kline@thought.org on Thu, Sep 14, 2000 at 08:25:48PM -0700 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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