Bash Function Guide: expr
Description: Performs mathematical calculations or string operations.
Syntax: expr EXPRESSION
Usage: Use expr when you want to calculate values inside Bash scripts.
Examples for expr
# Arithmetic a=5 b=3 echo $(expr $a + $b) # Output: 8 # String length str="Bash"
echo $(expr length "$str") # Output: 4