Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!bagate!cbmvax!cbmehq!cbmger!peterk From: peterk@cbmger.UUCP (Peter Kittel GERMANY) Newsgroups: comp.sys.amiga.tech Subject: Re: PIPEs (really: Slices) Message-ID: <570@cbmger.UUCP> Date: 13 Nov 90 09:47:09 GMT References: <6997@sugar.hackercorp.com> <1990Nov7.235254.13959@opusc.csd.scarolina.edu> <7025@sugar.hackercorp.com> <1990Nov12.101531.19828@agate.berkeley.edu> Reply-To: peterk@cbmger.UUCP (Peter Kittel GERMANY) Organization: Commodore Bueromaschinen GmbH, West Germany Lines: 40 In article <1990Nov12.101531.19828@agate.berkeley.edu> pete@violet.berkeley.edu (Pete Goodeve) writes: > >In <7025@sugar.hackercorp.com> (11 Nov), >Peter da Silva (peter@sugar.hackercorp.com) writes: >> >> OK, quick. How do you rename all whatever.c-or-h files to old.whatever.c-or-h >> with wildcards instead of slices? >> -- >Ah. You were asking a little while ago what Mat did that was unique. >Well (with the aid of a short CLI script) that sort of renaming is EXACTLY >one of the things I use it for. (The script is on Fish 374 too.) The >syntax -- also showing one of the ways I use '^' -- is: > > REN whatever.(c|h) old.^F > >where '^F' in this case means the original filename. Well, as long as you only want to ADD something to the old filename, then you are done also under 1.3 with the List Lformat feature: LIST >ram:doit whatever.(c|h) lformat="rename %s%s old.%s%s" EXECUTE ram:doit DELETE ram:doit >If I prefer whatever_OLD.c as the result, I do: > > REN whatever^.(c|h) ^0_OLD^1 > >where the '^' in the pattern is the slice point, and ^0 and ^1 are the >resulting pieces. Well, and this one is impossible with the above. But next question: Can you REPLACE parts of the filenames this way? Like: text#?.german --> text#?.english This is the one I would have needed the last weeks several times. -- Best regards, Dr. Peter Kittel // E-Mail to \\ Only my personal opinions... Commodore Frankfurt, Germany \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk