|
发表于 2003-4-9 03:00:07
|
显示全部楼层
不知道这样是否可以?
1,建立如下文件:
$touch 123name 234the 345oki tmp temp newfile
$ls
123name 234the 345oki newfile temp tmp
2,将所有以数字开头的文件的数字删除,即保留字母.
$file=$(ls|grep "^[0-9]..[a-z]") <=变量中只包含有三个数字的文件
$for i in $file
>do
> mv $i ${i##[0-9][0-9][0-9]}
> done
$ls
name newfile oki temp the tmp |
|