Theo has asked for the wisdom of the Perl Monks concerning the following question:
The project got renamed and now I need to change filenames to reflect the change. They should now be:newcam_boards.html newcam_boards_contents.html newcam_title.html newcam_title.shtml newcam_title_contents.html newcam_title_contents.shtml
The closest I have gotten in my unix system is this one-liner and it's subsequent error:Ucam_boards.html Ucam_boards_contents.html Ucam_title.html Ucam_title.shtml Ucam_title_contents.html Ucam_title_contents.shtml
Am I way off base here?%perl -e 'while(<*html>){m/newcam(_\w+\.s?html)/;rename $_,Ucam$1}' Can't locate object method "Ucam" via package "_boards.html" at -e lin +e 1.
-theo-
(so many nodes and so little time ... )
Note: All opinions are untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: batch rename with a 1 liner
by antirice (Priest) on Oct 08, 2003 at 00:27 UTC | |
|
Re: batch rename with a 1 liner
by jeffa (Bishop) on Oct 08, 2003 at 03:25 UTC | |
|
Re: batch rename with a 1 liner
by vanwie (Acolyte) on Oct 08, 2003 at 00:59 UTC | |
by DrHyde (Prior) on Oct 08, 2003 at 08:52 UTC | |
|
Re: batch rename with a 1 liner
by greenFox (Vicar) on Oct 08, 2003 at 02:35 UTC | |
|
Re: batch rename with a 1 liner
by idsfa (Vicar) on Oct 08, 2003 at 02:42 UTC | |
|
Re: batch rename with a 1 liner
by bart (Canon) on Oct 20, 2003 at 13:20 UTC |