$ 0 0 You can also use built in arithmetic in bash: rownum=$((nextnum+1)) which would be slightly faster.