Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

RE: Odd file rename

by jjhorner (Hermit)
on Jun 14, 2000 at 13:33 UTC ( #18093=note: print w/replies, xml ) Need Help??


in reply to Odd file rename

Here is a decent solution:

#!/usr/bin/perl -w foreach (@ARGV){ $name = $_ ; $name =~ s/T/B/; rename($_, $name); print "$_ renamed to $name\n"; }

Usage: changename.pl T*

I hope this helps.

J. J. Horner
Linux, Perl, Apache, Stronghold, Unix
jhorner@knoxlug.org http://www.knoxlug.org/

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://18093]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2021-05-16 00:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (151 votes). Check out past polls.

    Notices?