I want to create shell script check input startdate befor enddate.
Code :
echo "Enter StartDate (ddMM20YY) :"
read startdate
echo "Enter EndDate (ddMM20YY) :"
read enddate
Sdd=`expr substr "$startdate" 1 2`
Smm=`expr substr "$startdate" 3 2`
Syyyy=`expr substr "$startdate" 5 4`
echo "$Sdd $Smm $Syyyy"
echo "Enter EndDate (ddMM20YY) :"
read enddate
Edd=`expr substr "$enddate" 1 2`
Emm=`expr substr "$enddate" 3 2`
Eyyyy=`expr substr "$enddate" 5 4`
echo "$Edd $Emm $Eyyyy"
....
......
#expect output#
#Enter StartDate (ddMM20YY) :
#20052009
#Enter EndDate (ddMM20YY) :
#11052009
#Incorectly,Please Try again.
(How to check about startdate before enddate )
Help suggestion please.. Thank You