linux-bash-shell-command-line-math note for fractions/decimals you need "bc" echo $((1+2)) $((expression)) id++ id-- variable post-increment and post-decrement ++id --id variable pre-increment and pre-decrement - + unary minus and plus ! ~ logical and bitwise negation ** exponentiation * / % multiplication, division, remainder + - addition, subtraction <> left and right bitwise shifts = comparison == != equality and inequality & bitwise AND ^ bitwise exclusive OR | bitwise OR && logical AND || logical OR expr?expr:expr conditional operator = *= /= %= += -= <>= &= ^= |= assignment expr1 , expr2 comma