📄 statistcs.sh
字号:
#!/bin/shfunction format(){ printf "%-10s%8d%8d\n" $1 $2 $3}function statistics(){ FILES=$(find . -name "$1"|wc -l) LINES=$(cat $(find . -name "$1")|wc -l|awk '{print $1;}') format "$2" $FILES $LINES TOTAL_FILES=$(expr $TOTAL_FILES + $FILES) TOTAL_LINES=$(expr $TOTAL_LINES + $LINES)}statistics '*.h' "header"statistics '*.S' "assembly"statistics '*.cc' "cplusplus"format "total" $TOTAL_FILES $TOTAL_LINES
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -