⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 source-stats

📁 The Kannel Open Source WAP and SMS gateway works as both an SMS gateway, for implementing keyword b
💻
字号:
#!/bin/sh## Simple program to calculate source code statistics for Kannel.## Run with current working directory being the Kannel source root.## Output:##	- number of source files#	- number of lines total#	- number of non-empty files#	- number of lines with semicolonsDIRS="gw gwlib wmlscript wap"find $DIRS -type f ! -name .cvsignore ! -name control.html \	! -name '*kannel.conf' ! -name 'wsgram.[ch]' ! -name '*.txt' \	! -name '*.[ao]' ! -name '*box' ! -name wmlsc ! -name wmlsdasm |grep -v /CVS/ > files.txtcat <<EOF<table><caption>Source line statistics `date +%Y-%m-%d`</caption><tr> <td>Number of files<td>       <td>`wc -l < files.txt`</td></tr><tr> <td>Lines total</td>          <td>`xargs cat < files.txt | wc -l`</td></tr><tr> <td>Non-empty lines</td>      <td>`xargs grep -v '^[ 	]*$' < files.txt | wc -l`</td></tr><tr> <td>Lines with semicolons</td><td>`xargs grep ';' < files.txt | wc -l`</td></tr></table>EOFrm -f files.txt

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -