sngclrt01 mengdi 167: man rename
No manual entry for rename.
sngclrt01 mengdi 168: man -k rename
sngclrt01 mengdi 169: rename
ksh: rename: not found
sngclrt01 mengdi 170: sh
sngclrt01 mengdi 171: rename
sh: rename: not found
not the most efficient one, since i am new to perl. but enough for your work#!/usr/bin/perl
@list = `ls test/*.b`;
foreach $a (@list){
chomp($a);
$com = "mv ".$a." $a.c";
exec($com);
}
assume your dir is "test" your old extension is .b , new one is .c
I hope to see perl experts to show me the greatest power of perl by doing same job using many and much more efficient ways :)