shell: Bash re-structuring