18.10 There's More than One Way to Do It[In article 18.9 , Jerry Peek shows how if you really understand the shell and utilities like sed , you can easily construct custom commands to change one set of filenames to another according to some regular pattern. In article 18.11 , Linda Mui explains a C program that makes the job easier - and has some built-in safeguards that prevent any renames if some of the moves could cause problems. Here, Larry Wall and Randal Schwartz present a Perl (37.1 ) script that gives you a different kind of power and flexibility. By the way, that's the Perl slogan: "There's more than one way to do it." -TOR ]
For example, to rename all files matching
% But you're not limited to simple substitutions - you have at your disposal the full expressive power of Perl. To add those extensions back on, for instance, say this: % or even: % To translate uppercase names to lowercase, you'd use: % And how about these? % [Of course, to even understand some of these more complex incantations, you have to learn more about Perl, which is just the point... It's worth taking the time to learn. -TOR ] - , |
|