含空行注释
1 | find . -name "*.java"|xargs wc -l|grep "total"|awk '{print $1}' |
去空行
1 | find . -name "*.java"|xargs cat|grep -v ^$|wc -l #Output:36335 |
去注释
1 | find . -name "*.java"|xargs cat|grep -v -e ^$ -e ^\s*\/\/.*$|wc -l #Output:36064 |
Update your browser to view this website correctly. Update my browser now