Remove carrige return and new line in the cmd string.