Hi ,
I need to compare the given date with the system date . can you tell me any way , how to do it.
The given date format is "23-AUG-2008".
I need to compare it with the system time , i have got the system time in the same format by using the command "date +%e-%b-%y" ,its giving the date as "23-Aug-2008".
I'm nt getting the desired output. Can anyone help me out.
I'm using the following piece of code
variable="23-AUG-08"
variable2=`date +%e-%b-%y`
if [ $variable2 \< $variable ]
then
echo "worked"
else
echo "didnot "
fi
Is this piece of code correct ??? or there is another way to do it ????