Hi All,
This should be easy, but I think it is due to my inexperience. I'm trying to compare to dates in bourne shell.
the first date comes from an SQL field type that stores the date and the second variable gets the date by this command: date -v -6m "+%F %T"
The two variables are
$login
$sixmonthsago
I need to print only the records that match if the login is less than six months ago.
From looking around, I thought this might work, but it seems to print all records still. Note: there are records older than six months being printed. I also wondered if it is messing up since some $logins are NULL or blank.
if [ "$login" \< "$sixmonthsago" ]
then
print record
fi
I will continue to work on solving this, just thought I would ask more experienced people.
This should be easy, but I think it is due to my inexperience. I'm trying to compare to dates in bourne shell.
the first date comes from an SQL field type that stores the date and the second variable gets the date by this command: date -v -6m "+%F %T"
The two variables are
$login
$sixmonthsago
I need to print only the records that match if the login is less than six months ago.
From looking around, I thought this might work, but it seems to print all records still. Note: there are records older than six months being printed. I also wondered if it is messing up since some $logins are NULL or blank.
if [ "$login" \< "$sixmonthsago" ]
then
print record
fi
I will continue to work on solving this, just thought I would ask more experienced people.