Remove trailing white space from script