Re: rename lot of files

2001-04-20 Thread Anthony E . Greene
On Fri, 20 Apr 2001 09:59:19 Emmanuel Seyman wrote: >On Fri, Apr 20, 2001 at 08:15:59AM -0500, Jim Baxter a ecrit: >> Is there a way to rename all the files in a directory the end with .123 >> to end with .src ? > >You can use the rename program from the util-linux rpm and use it: > rename "

Re: rename lot of files

2001-04-20 Thread Dan Stromberg
On Fri, Apr 20, 2001 at 09:30:04AM -0400, rpjday wrote: > it's not at all clear that one wants to invoke perl when the shell > will do it all. Agreed. I kind of like: ls *.123 | sed 's/^\(.*\)\.123$/mv \1.123 \1.src/' | sh But rename is probably the best solution. -- Dan Stromberg

Re: rename lot of files

2001-04-20 Thread Richard Critz
for i in *.123; do mv $i `basename $i .123`.src done -r - Original Message - From: "Jim Baxter" <[EMAIL PROTECTED]> To: "Redhat" <[EMAIL PROTECTED]> Sent: Friday, April 20, 2001 9:15 AM Subject: rename lot of files > Hi > > Is there a way t

Re: rename lot of files

2001-04-20 Thread rpjday
On Fri, 20 Apr 2001, Emmanuel Seyman wrote: > On Fri, Apr 20, 2001 at 08:15:59AM -0500, Jim Baxter a ecrit: > > Hi > > > > Is there a way to rename all the files in a directory the end with .123 > > to end with .src ? > > Several, actually: > > You can use the rename program from the util-linux r

Re: rename lot of files

2001-04-20 Thread Emmanuel Seyman
On Fri, Apr 20, 2001 at 08:15:59AM -0500, Jim Baxter a ecrit: > Hi > > Is there a way to rename all the files in a directory the end with .123 > to end with .src ? Several, actually: You can use the rename program from the util-linux rpm and use it: rename ".123" ".src" *.123 You can u

Re: rename lot of files

2001-04-20 Thread Anand Buddhdev
On Fri, Apr 20, 2001 at 08:15:59AM -0500, Jim Baxter wrote: > Hi > > Is there a way to rename all the files in a directory the end with .123 > to end with .src ? > > example test.123 to test.src A bit of scripting: ls *.123 | perl -e ' while(<>) { chop; $old=$_; chop; chop; chop; $new=$_ . "s

rename lot of files

2001-04-20 Thread Jim Baxter
Hi Is there a way to rename all the files in a directory the end with .123 to end with .src ? example test.123 to test.src Thanks Jim Baxter Morrison Supply Company MIS ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/