Path: utzoo!attcan!uunet!samsung!emory!hubcap!ncrcae!opusc!yarnall From: yarnall@opusc.csd.scarolina.edu (Ken Yarnall) Newsgroups: comp.sys.amiga.tech Subject: Re: PIPEs Message-ID: <1990Nov12.025436.3189@opusc.csd.scarolina.edu> Date: 12 Nov 90 02:54:36 GMT References: <6997@sugar.hackercorp.com> <1990Nov7.235254.13959@opusc.csd.scarolina.edu> <7025@sugar.hackercorp.com> Organization: Math Department, University of South Carolina (ahem; The USC) Lines: 38 In article <7025@sugar.hackercorp.com> Peter da Silva writes: +> +For things like "move", I'd rather go to slices: + +> + move {.*}.c \1.h + +In article <1990Nov7.235254.13959@opusc.csd.scarolina.edu> yarnall@opusc.csd.scarolina.edu (Ken Yarnall) writes: +> Yeah, right. That is much clearer...:-) + +OK, quick. How do you rename all whatever.c-or-h files to old.whatever.c-or-h +with wildcards instead of slices? Well, this is as quick as I can get :-) First, some honesty: I have never done exactly what you ask, so I didn't know if the way I wanted to do it would work. So, I resolved to try it exactly once, the way I assumed it would work. If that didn't fly, I would admit it. Praise be to Allah, it did ;^) First, I used Arp's copy command. I don't know if C='s 1.3.2 will do this, or not, but the Arp pattern matching library does it just fine. Use the line copy #?.(c|h) old.#? Works like a champ. And this is how I expected it to work! I expect a `#?' in the 2nd expression to resolve to all of the characters in the current filename, which is gotten from the 1st expression. Admittedly, one can construct convoluted examples that won't be doable this way. Come up with a useful one, though, and I'll be impressed... +Peter da Silva. `-_-' ken -- Ken Yarnall /// yarnall@usceast.cs.scarolina.EDU Math Department, USC \\\/// yarnall@ucseast.UUCP Columbia, S.C. 29208 \\\/ (803)777-5218 `You'd better tie me up.' -- from the movie, "Tie Me Up, Tie Me Down"