Synopsis

let arg [arg ...]

Description

The let builtin command evaluates each supplied word from left to right as an arithmetic expression and returns an exit code according to the truth value of the rightmost expression.

* 0 (TRUE) when arg evaluated to not 0 (arithmetic "true")
* 1 (FALSE) when arg evaluated to 0 (arithmetic "false")

Synopsis

(( ))

Description

This command evaluates the arithmetic expression .

If the expression evaluates to 0 then the exit code of the expression is set to 1 (FALSE). If the expression evaluates to something else than 0, then the exit code of the expression is set to 0 (TRUE). For this return code mapping, please see this section.

Synopsis

(( ))

Description

This command evaluates the arithmetic expression .

If the expression evaluates to 0 then the exit code of the expression is set to 1 (FALSE). If the expression evaluates to something else than 0, then the exit code of the expression is set to 0 (TRUE). For this return code mapping, please see this section.

Arithmetic expressions are used in several situations:

* arithmetic evaluation command
* arithmetic expansion
* substring parameter expansion
* the ''let'' builtin command
* C-style for loop
* array indexing
* conditional expressions

Arithmetic expressions are used in several situations:

* arithmetic evaluation command
* arithmetic expansion
* substring parameter expansion
* the ''let'' builtin command
* C-style for loop
* array indexing
* conditional expressions
* Assignment statements, and arguments to declaration commands of variables with the integer attribute.

$(( ))

$[ ]

The arithmetic expression is evaluated and expands to the result. The output of the arithmetic expansion is guaranteed to be one word and a digit in Bash.

Please do not use the second form $[ ... ]! It's deprecated. The preferred and standardized form is $(( ... ))!

$(( ))

$[ ]

The arithmetic expression is evaluated and the resulting value replaces the whole $((...)) construct:

Please do not use the second form $[ ... ]! It's deprecated. The preferred and standardized form is $(( ... ))!

Arithmetic expressions are used in several situations:

* arithmetic evaluation command
* arithmetic expansion
* substring parameter expansion
* the ''let'' builtin command
* C-style for loop
* array indexing
* conditional expressions
* Assignment statements, and arguments to declaration commands of variables with the integer attribute.

A mathematics game for everybody
You have to calculate simple arithmetic expression in a short time. Choose true or false for each question.
Try to get high score.

Starting today, you can have special and wonderful alarm's sound.

Download: