strip output of run_cmd