Arithmetic expansion
$((expression))
 
echo $(( 4 + 2 ))
y=4
x=2
echo $(( $y + $x ))
echo $(( y + x ))
$(( 4 ** 2)) # 4 to the power of 2
bc command
echo "5/2" | bc
echo "scale=2; 5/2" | bc # scale: number of decimal digits
Command Substitution

$(command)

time=$(date +%H:%m:%S)

History Expansion

Shell Parameters
How Bash process command line