chlog-stats
资源名称:gateway-1.2.1 [点击查看]
上传用户:gzpyjq
上传日期:2013-01-31
资源大小:1852k
文件大小:1k
源码类别:
手机WAP编程
开发平台:
WINDOWS
- #!/usr/bin/awk -f
- #
- # Compute some simple statistics from a ChangeLog file. Output has several
- # columns:
- #
- # 1) number of changelog entries
- # 2) total lines in changelog entries
- # 3) average lines per entry
- # 4) username
- #
- # Output is not sorted. Use "sort -n" to sort.
- #
- # Lars Wirzenius
- /^[a-zA-Z0-9]/ {
- match($NF, /<.*@/)
- who = substr($NF, RSTART+1, RLENGTH-2)
- if (who == "") who = $NF
- entries[who]++
- next
- }
- /[^ ]/ { lines[who]++ }
- END {
- for (who in entries)
- printf "%4d %4d %.1f %sn", entries[who], lines[who],
- lines[who]/entries[who], who
- }