• var+=1 will append, not increment. Use (( var += 1 )), declare -i var, or quote number to silence.
  • Problematic code:
  • Correct code:
  • Rationale:
  • Exceptions:
  • Related resources: