News for hackers. Stuff that matters.
Re:Bash Retry Function with Exponential Backoff by fab23 on Thursday December 29, 2022 @06:47PM (#34179697)
It does also matter where the plus signs are:

  $ i=0
  $ echo $((++i))
  1
  $ echo $((i++))
  1
  $ echo $((++i))
  3
  $
((++i)) does add 1 before the command is run, and ((i++)) does add 1 after the command is run.

There are no comments on this comment yet.