Strip cmd string