add "clear code" at the begin of command, delete useless codes, and... find some compatibility problems with bash