[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: batch renaming




> What is the simplest way to do such renaming ?
> I have many file with the same preceding string in their name.
> I want to remove that.

by using perl like this:

while(<*.for>) {
  $oldname = $_;
  s/\.for$/\.f/;
  rename $oldname, $_;
}

this takes all filenames ending with .for and renames them to .f




=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il