run_cmd_by_string() switch() modified