polish bash scrpit, auto remove useless stuff