arithmetic-operator

Bash <<= assignment operator

Updates the variable using the arithmetic << operation and assignment. The expression yields the assigned value.

Formal Syntax & Structure

bash syntaxbash
(( n <<= value ))

Return Value

integer

Updates the variable using the arithmetic << operation and assignment. The expression yields the assigned value.

Working Example

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