Replaced calls to sh, with bash, for Ubuntu compatibility.