arithmetic-operator

Bash << arithmetic operator

Shifts bits left; example uses a small nonnegative integer and safe shift count.

Formal Syntax & Structure

bash syntaxbash
$(( 3 << 2 ))

Return Value

integer

Shifts bits left; example uses a small nonnegative integer and safe shift count.

Working Example

Example Snippetbash
printf '%s\n' "$(( 3 << 2 ))"
Bash Reference