![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do I rename a bunch of files at once? | bbbngowc | UNIX for Dummies Questions & Answers | 8 | 04-21-2008 06:23 AM |
| Renaming Files | abch624 | UNIX for Dummies Questions & Answers | 2 | 03-19-2008 09:35 PM |
| renaming files | jxh461 | UNIX for Dummies Questions & Answers | 1 | 02-04-2008 06:32 PM |
| Renaming files | cedrichiu | Shell Programming and Scripting | 3 | 04-06-2007 01:35 AM |
| grep'ing for text within a bunch of files...? | kitykity | UNIX for Dummies Questions & Answers | 1 | 09-19-2000 05:50 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Renaming a bunch of files
Hi Can any body help me reg. this problem? The problem is
the format of the shell script should be >renam old new rename: it renames all files in current directory from old extension to new extension old: it is the old extension of file name (including the '.' ) new: its the new extension eg: renam .htm .html it converts all files from .htm to .html extension eg: renam .txt -txt it converts all files from .txt to -txt like .. if a file name was zz.txt it should become zz-txt Please help me regarding this problem Thank you bye Prash |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
This looks suspiciously like homework to me, however if you search you will find some useful information.
|
|
#3
|
|||
|
|||
|
xargs comes to ur rescue .... try something like this ....
ls *.htm | xargs -i basename {} ksh | xargs -i -p -t mv {}htm {}html Regards, SNS |
|||
| Google The UNIX and Linux Forums |