January 2001
Intermediate to advanced
480 pages
7h 22m
English
A conditional expression is used with the [[compound command to test attributes of files and to compare strings. Field 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:
| string | True, if string is not null. |
| -a file | Same as -e below. This is obsolete. |
| -b file | True, if file exists and is a block special file. |
| -c file | True, if file exists and is a character special file. |
| -d file | True, if file exists and is a directory. |
| -e file | True, if file exists. |
| -f file | True, if file exists and is an ordinary file. |
| -g file | True, if file exists and it has its setgid bit set. |
| -k file | True, if file exists and ... |
Read now
Unlock full access