check_license.sh
来自「Linux系统下,二维码生成源代码.希望对大家有所帮助.」· Shell 代码 · 共 26 行
SH
26 行
#!/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 + =
减小字号Ctrl + -
显示快捷键?