terminal.cab

All commands

test also [

Topic: Shell and scripts

Shell builtin: test

Checks files, strings and numbers.

Package: script-werkzeuge

Usage

test [expr]

Description

Succeed when EXPR is true and fail when it is false, for example -f FILE (a regular file), -d DIR, -z STRING (empty), A = B, N -lt M. ! negates, -a and -o join two tests.

Options in the simulator

No options.

Shell builtin: [

Checks files, strings and numbers.

Package: script-werkzeuge

Usage

[ [ expr ]

Description

Succeed when EXPR is true and fail when it is false, for example -f FILE (a regular file), -d DIR, -z STRING (empty), A = B, N -lt M. ! negates, -a and -o join two tests. The last argument must be ].

Options in the simulator

No options.

Where you learn it

No lesson yet.

All commands