arithmetic-operator
Bash % arithmetic operator
Returns the remainder after integer division; zero divisor is an error.
Formal Syntax & Structure
bash syntaxbash
$(( 19 % 4 ))Return Value
integer
Returns the remainder after integer division; zero divisor is an error.
Working Example
Example Snippetbash
printf '%s\n' "$(( 19 % 4 ))"