Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

RE: Odd file rename

by jjhorner (Hermit)
on Jun 14, 2000 at 17:33 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://18093]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-04-19 11:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found