paperlined.org
apps > bash
document updated a month ago, on Jan 17, 2025

Bash

How does Bash determine true/false?

'if' by itself

Without using test, Bash only considers a program's exit status. Zero ⇒ true, non-zero ⇒ false.

For example:

test AKA [

Test is both an standalone tool as well as a Bash built-in. It's also known as '['.

extended test command AKA [[

(TODO)

arithmetic command AKA ((

(TODO)