Yeah! It will work, but the user will get confuse when giving the sapce between date,month,year. I mean they generally give date as 12122010 instead of 12 12 2010. Now gimmi some idea how to specify the fixed place to the date fields i.e.,
as soon as the user enters DAY number it should jump into the MONTH field and then next to YEAR field. Screen display as following...
Enter date as dd mm yyyy : <DAY> / <MONTH> / <YEAR>
I did something different using awk, but it is also almost same like your solution....
read -p " Enter Date as ddmmyyyy : " dat
}' infile > outfile
but my request is there should be only
2 digit place for day
2 digit place for month
4 digit place for year
Last edited by visitnag; 01-30-2010 at 10:17 AM.