February 2001
Beginner to intermediate
448 pages
9h 2m
English
Official Description
Begins a comparison.
Syntax
[ expression ]
Options
-a can be used as a logical and operator in compound tests.
-o can be used as a logical or operator in compound tests.
Oddities
It has pretty much been replaced by the [[ ]] command.
It's similar to the test command.
Example
$ [ -x buzz ] $ echo $? 0 # buzz is executable $ $ [ -x core ] $ echo $? 1 # core is not executable $
Read now
Unlock full access