how does bash works?