trim spaces from the start and the end of the command