Merge changes from topic "bashisms"

* changes:
  [COMMON] Fix array variables increments
  [COMMON] Fix some bashisms