I would use (as was mentioned before) rownum=$((nextnum+1))
or ((rownum=nextnum+1))
but if you prefer an standard command you can use the let command, like let rownum=$nextnum+1
↧
Answer by Hola Soy Edu Feliz Navidad for Calculate variable, and output it to another variable
↧