# !/usr/bin/ksh while read str1 str2 cnt do i=1 while [ cnt -ge 1 ] do echo $str1 $str2 $i cnt=$(($cnt - 1)) i=$(($i + 1)) done done < datafile exit 0