0

Bash的命令行使用For循环

Posted in Linux at 十月 26th, 2010 / No Comments »

经常会遇到这种情况,要对一批文件挨个进行处理,又不想写一个脚本, 例如查找所有的jar包中是否存在特定的类 for f in `ls *.jar`; do jar tvf $f|grep FileAlreadyExistsException; done 注意如果使用for f in ...