On Sun, Jun 13, 2021 at 05:05:55PM +0530, Susmita/Rajib wrote:
> #!/bin/bash
> expr $(( i = i + 1 ))

Try one of these alternatives:

i=$((i + 1))      # This one also works in sh.
((i = i + 1))     # These two are bashisms.
((i++))

> echo "Ending..."
> echo i

Pretty sure you intended this to be echo "$i".

Reply via email to