使用shell脚本来查询指定目录下的java文件的个数
1.先创建一个shell脚本vim countFile.sh2.编写如下内容 到脚本中#!/bin/bashdir=$1echo $dirif [ -d $dir ]thencd $dirpwdecho pwd|ls -lR|grep ‘^-’ | awk -F " " ‘{print $9}’|grep java|wc -lelseecho ‘not good’fi3...
原创
2019-06-11 21:29:57 ·
612 阅读 ·
0 评论