Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

This is about the Unix utility "test," also invoked as "[", or its shell syntax [[ … ]] variant. For questions about testing software and setups, use the "testing" tag.

The test, or [, utility is used in the shell and shell scripts to evaluate conditions, usually for conditional execution of code.

Ksh, bash and zsh also have a dedicated syntax [[ … ]].

Further reading

history | excerpt history