Shell递归程序设计-批量转换大写文件名为小写
时间:2008-05-10 来源:sdccf
iTbulo.COM |
#cvlc.sh cvitem() { echo"mv$1`dirname$1`/`basename$1|tr\ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ''abcdefghijklmnopqrstuvwxyz'`" } [$#=0]&&{echo"Usage:lcdiritem1item2...";exit;} foritemin$* do ["`dirname$item`"!="`basename$item`"]&&{ [-d$item]&& { forsubitemin`ls$item` do cvlc$item/$subitem done } cvitem$item } done #(End) |
相关阅读 更多 +