ksh loop update