Date: Fri, 15 Sep 2000 14:50:48 +1100 (EST) From: Iain Templeton <iain@research.canon.com.au> To: Gary Kline <kline@thought.org> Cc: freebsd-stable@FreeBSD.ORG Subject: Re: "set -A" Bourne script - a nogo on FreeBSD Message-ID: <Pine.SOL.4.10.10009151445550.12416-100000@elph.research.canon.com.au> In-Reply-To: <200009150325.e8F3Pns34741@thought.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 14 Sep 2000, Gary Kline wrote: > According to Gregory Bond: > > > > > Seems FreeBSD's Bourne shell's "set" command doesn't support -A. > > > > AFAICT "set -A" is a ksh-ism, not a bourne-ism. On my Solaris systems, ksh > > has "set -A", but neither bash nor sh do. Install one of the ksh verisions > > from the ports. > > > > I have a csh or sh question--sorry for asking it this way; > but is there any rational way of turning a file named > > foo.c to foo.o or simply foo with or without calling > non-builtin programs? I think I remember a sh wizard > showing me some bizarre sh command...but not sure it wasn't > a dream! > How about from sh(1) (albeit rather poorly copied) ${parameter%word} Remove Smallest Suffix Pattern. The word is expanded to produce a pattern. The parameter expansion then results in parameter, with the smallest portion of the suffix matched by the pattern deleted. ${parameter%%word} Remove Largest Suffix Pattern. The word is expanded to produce a pattern. The parameter expansion then results in parameter, with the largest portion of the suffix matched by the pattern deleted. eg... for i in *.ps do t=${i%.ps} echo $t ~/bin/gs <blah> -sOutputFile=$t.ujw $i done Iain Assuming that make foo.o wasn't what you meant 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?Pine.SOL.4.10.10009151445550.12416-100000>