Path: utzoo!mnetor!uunet!lll-winken!lll-tis!oodis01!uplherc!utah-gr!stride!ctr
From: ctr@Stride.COM (Chris Reimer)
Newsgroups: comp.unix.questions
Subject: Re: Need a file renaming facility
Message-ID: <784@stride.Stride.COM>
Date: 4 May 88 18:30:15 GMT
References: <3564@fluke.COM>
Reply-To: ctr@xpiinc.uu.net (Christian Reimer)
Organization: Stride Micro, Reno, NV
Lines: 19

In article <3564@fluke.COM> inc@tc.fluke.COM (Gary Benson) writes:
>
>    QT.1.r	   QT.4.r	       QT.A.r
>    Qt.1.r.pre	   QT.4.r.pre	       QT.A.r.pre
>
>Now I want to rename all those ".pre" files to the same name without ".pre".

Try:
	foo% foreach i ( `ls *.pre | sed 's/.pre$//'` )
	? echo "Moving ${i}..."
	? mv ${i}.pre $i
	? end

Obviously (I hope), this must be run under csh.  Enjoy!

--- 
Christian Reimer	"Through Truth and Justice, Virtue will Grow!"
ctr@xpiinc.uu.net			- The Salamander
...!uunet!xpiinc!ctr
---