Problem Description
I can't seem to be able to increase the variable value by 1. I have looked at [tutorialspoint's *Unix / Linux Shell Programming* tutorial](http://www.tutorialspoint.com/unix/unix-basic-operators.htm) but it only shows how to add together two variables.
I have tried the following methods but they don't work:
i=0
$i=$i+1 # doesn't work: command not found
echo "$i"
$i='expr $i+1' # doesn't work: command not found
echo "$i"
$i++ # doesn't work*, command not found
echo "$i"
How do I increment the value of a variable by 1?
AI-Generated Solution
Powered by LMSouq AI · GPT-4.1-mini
Analyzing problem and generating solution…
Was this solution helpful?