Bash how does it work