fix some bugs of hpux scripts