How to increment local variable in Bash?

I'm getting 2 from your code. Nevertheless, you can use the same technique for any variable or number:

local start=1
(( start++ ))

or

(( ++start ))

or

(( start += 1 ))

or

(( start = start + 1 ))

or just

local start=1
echo $(( start + 1 ))

etc.


Try:

START2=$(( `getStart` + 1 ));

The $(( )) tells bash that it is to perform an arithmetic operation, while the backticks tells bash to evaluate the containing expression, be it an user-defined function or a call to an external program, and return the contents of stdout.