diff --git a/os/check1.sh b/os/check1.sh index 78d0ffc..9018176 100644 --- a/os/check1.sh +++ b/os/check1.sh @@ -19,7 +19,7 @@ check_command "id tom &>/dev/null && id jack &>/dev/null && grep hr /etc/group & check_command "[ -d /opt/myfile ] && [ -f /opt/myfile/hello.txt ] && [ -f /opt/world.txt ]" 3 # 4. 检查world.txt文件是否包含abcde字符串,且重复10行 -check_command "grep -Fxq 'abcde' /opt/world.txt && [ \$(grep -c 'abcde' /opt/world.txt) -eq 10 ]" 4 +check_command "grep -Fxq 'abcde' /opt/world.txt && [ \$(grep -c 'abcde' /opt/world.txt) -ge 10 ]" 4 # 5. 检查world.txt文件的属主是否为jack,属组是否为hr check_command "[ \$(stat -c '%U' /opt/world.txt) = 'jack' ] && [ \$(stat -c '%G' /opt/world.txt) = 'hr' ]" 5