(1) The usage of test
(2) []
(3) &&
can also be seen that the front is successful and then executed, the front is unsuccessful, and the later is not executed
(4) ||
or the idea
(5) -f, -d, -x
-f is used to determine whether the file exists:
-d is used to determine whether the file is a directory
-x is to determine whether the file is executable
(6) -eq, -gt, -ge, -lt, -le, -ne
are equal to, Greater than, greater than or equal to, less than, less than or equal to, not equal to
Shell (4)-test test, [], logic &&, || file -f, -d, -x, -eq, -gt, -ge, -lt, -le, -ne
Guess you like
Origin blog.csdn.net/weixin_48445640/article/details/109183268
Recommended
Ranking