O'Reilly logo

Unix in a Nutshell, 4th Edition by Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

test

Synopsis

    test expression
            or
    [ expression ]

Evaluate an expression and, if its value is true, return a zero exit status ; otherwise, return a nonzero exit status. In shell scripts, you can use the alternate form [ expression ]. The brackets are typed literally and must be separated from expression. Generally, this command is used with conditional constructs in shell programs. See Chapter 4 for more information on test.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required