finish echo and ps cmd