每次快到年底的时候各种的审计工作都在进行中,而最近应为部门需要统计个人写的代码有多少为此,为了方便统计就写了一个脚本用于统计代码的行数,脚本如下:#!/bin/bash #count.sh #Use Count the number of lines of code #writer jim #history #2017.02.06 if [ $# -lt 1 ];then echo "please enter argc!" echo "ex> $0 path" exit 0 fi
if [ $# -gt 1 ]; then echo "too many input path!" echo "ex> $0 argc" exit 0 fi