|
|
|
|
复制本帖HTML代码
|
高亮:
今天贴
X 昨天贴
X 前天贴
X |
#!/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 :)
.
|
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法! |

Ever Thine, Ever Mine, Ever Ours
|
|