Table of Contents

About

The Boolean data type in Bash.

Bash has a true built-in.

Management

Condition

condition=true

if [ "$condition" = true ] ; then
    echo 'Go'
fi

# or double bracket format
if [[ "$bool" = true ]]; then
  echo 'Go'
fi

Operator

See Bash - Boolean / Logical Operator