#!/bin/ksh while read line do echo $line | cut -c1-10 | sed -e 's/\// /g' | read D M Y echo $Y/$M/$D$(echo $line | cut -c11-) done < infile