Remove extra line at the end of  shell script