Shell统计代码行数
来源:互联网 发布:java md5加密 32位 编辑:程序博客网 时间:2024/05/22 07:41
本博文为原创,遵循CC3.0协议,转载请注明出处:http://blog.csdn.net/lux_veritas/article/details/9097927
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
最近想统计一下研究生两年以来的代码量,于是写了个简单的bash脚本。
目录结构相对简单,脚本也没有过多测试,贴出来大家玩:
#!/bin/sh# specify the path after the executable bash script# eg. ./count_lines my_path# this will count current dir if parameter is nullCOUNT=0func_count(){ for file in `ls $1` ; do DIR=$1/$file if [ -f $DIR ] ; then COUNT=$(($COUNT+`sudo wc -l $DIR | cut -d " " -f 1`)) elif [ -d $DIR ] ; then func_count $DIR fi done}if [ ! -n "$1" ]; then func_count .else func_count $1fiecho "the total num is: $COUNT"
- Shell统计代码行数
- Shell统计代码行数
- shell统计代码行数
- 一条shell统计代码行数
- 一条shell统计代码行数
- shell统计文件夹代码行数
- shell工程代码行数统计
- 一条shell统计代码行数
- shell统计C代码行数
- shell实现代码行数统计
- 统计代码行数的shell脚本
- 利用shell脚本统计代码行数
- 一行shell命令实现代码行数统计
- shell 统计程序代码行数
- 统计代码行数代码
- 一条shell指令统计项目的代码行数
- 一句shell命令搞定代码行数统计
- 一句shell命令搞定代码行数统计
- 导数、极限的本质
- vc中单文档程序切换不同视图
- postgis 常用函数
- SurfaceView中弹出Dialog的实现
- Handling IRPs: Introduction
- Shell统计代码行数
- attrs.xml文件中属性类型format值的格式 .
- ARM920T的MMU与Cache
- linux SysV IPC实现
- jQuery学习02---jQuery对象与Dom对象
- 傅盛2
- 深入理解java多态性
- Hdu递推求解专题练习(For Beginner)
- mac ftp server