Shell variables seem to exhibit local scoping behavior. Example: #!/bin/sh i=0 cnt=0 while [ i -lt 5 ] do cnt=$cnt+1 echo $cnt i=$i+1 done echo $cnt results: 1 2 3 4 0
This issue has been forwarded to a developer for further action.
The example provided is invalid (is not a shell script)