what is the purpose of expr in shell script
expr expr evaluates integer or string expressions, including pattern matching regular expressions. Each symbol (operator, value, etc.) in the expression must be given as a separate parameter. Most of the challenge posed in writing expressions is preventing the invoking command line shell from acting on characters intended for expr to process.