define get_cmd