文件类型判断 test -e filename:该文件名是否存在 test -f filename:该文件名是否存在且为文件(file) test -d filename:该文件名是否存在且为目录(directory) 文件权限判断 test -r filename:该文件名是否存在且有==可读==的权限 test -w filename:该文件名是否存在且有==可写==的权限 test -x filename:该文件名是否存在且==有可执行==的权限 两个整数之间的判定,例如 test n1
摘自http://www.comptechdoc.org/os/linux/usersguide/linux_ugshellpro.html Tests There is a function provided by bash called test which returns a true or false value depending on the result of the tested expression. Its syntax is: test expression It can
2 Trigger expression Overview The expressions used in triggers are very flexible. You can use them to create complex logical tests regarding monitored statistics. A simple useful expression might look like: {<server>:<key>.<function>(&
conditional expressions are used by the [[ compound command and the test and [ builtin commands. arithmetic expression 共有三个 [[,test,[ Shell中[和[[的异同 test判断方式: [ ] 不支持Shell中提供的各种通配符状态判断的方式:[[ expr ]],和test不同的是,该方式中的表达式支持通配符,在[[ expression ]]中,expressio