#609: Remove unnecessary variables in bash scripts

Resolves #609.