Fixed bash syntax and added echo-on-completion.