📄 check_license.sh
字号:
#!/bin/shFILE="$1"TEST1="^modify it under the terms of the GNU Lesser General Public\$"TEST2="^MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\. See the GNU\$"TEST3="^You should have received a copy of the GNU Lesser General Public\$"COUNT=0grep --silent "$TEST1" $FILECOUNT=$(( COUNT + $? ))grep --silent "$TEST2" $FILECOUNT=$(( COUNT + $? ))grep --silent "$TEST3" $FILECOUNT=$(( COUNT + $? ))if [[ "$COUNT" -gt 0 ]]; then echo "Missing license text in $FILE" exit 1fiexit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -