Use bash shell arthmetic, remove redundant parameter expansion syntax.

Within shell arithmetic expressions the parameter expansion syntax can be dropped.