Jump to content

Expr and $(( ))

From Squishu Wiki

General

  • Use expr to do math
    • x = `expr $x + 1` or use this syntax too x=$(expr $1 + 1)
      • Can't you just do x = $x + 1???
  • In modern scripts expr is replaced with $((...)