Remove trailing space from command line