A conditional expression is used with the [[ compound
command to test attributes of files and to compare strings. Word splitting and file name generation are not performed on the words between [[ and ]]. Each expression can be constructed from one or more of the following unary or binary expressions:
-a file True, if file exists.
.
.
-s file True, if file exists and has size greater than zero.
# unquote
The [ is a replacment for test. The following
fragments are equivalent:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.