![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| rename a lot of files again | ajp7701 | Shell Programming and Scripting | 11 | 03-31-2008 08:36 PM |
| rename files help | piltrafa | UNIX for Dummies Questions & Answers | 2 | 10-04-2007 10:47 AM |
| rename many files | fsmadi | SUN Solaris | 4 | 04-30-2007 12:27 PM |
| How to rename files? | CompuTelSystem | UNIX for Dummies Questions & Answers | 9 | 05-14-2002 04:28 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
trying to rename the files in dir
I have bunch of files in win xp machine with
123456 E15 filename 112333.E20 filename 123412.E11 filename you get the pic, I mount that xp machine's share into linux and try to do a mass rename to something simpler E15 filename E20 filename and so on.. I wrote below thinking that it would work but it does not.. can someone advise? #!/bin/sh ls | egrep "^[0-9][0-9][0-9][0-9][0-9]" | while read a do echo $a yahoo=`sed 's/^[0-9][0-9][0-9][0-9][0-9][0-9][ .]//gi'` mv $a $yahoo ; mv $yahoo $a done |
| Bookmarks |
| Tags |
| linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|