remove trailing whitespaces from shell scripts