LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 01-29-2013, 11:29 PM   #1
rajachan
LQ Newbie
 
Registered: Jan 2013
Posts: 10

Rep: Reputation: Disabled
Question date comparision


hi ..

i need to do ksh script to compare two dates.

one date is from file which have output like below
11-JAN-13
06-MAR-11

second date should be 15 days before the current date.
for ex: if currrent date is 30 jan... second date should be 15 jan


now i have to compare these two dates.

if 11-JAN-13 >second date then
echo "output is date is recent(less than 15 days)
else
echo "not recent)"
 
Old 01-30-2013, 12:45 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Half of this question was answered here already: http://www.linuxquestions.org/questi...te-4175447005/ and for the comparison part converting dates to epoch is probably the easiest. See 'man date'?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
comparision between python and java vsandy Linux - General 5 10-18-2010 09:10 PM
string comparision Fond_of_Opensource Linux - Newbie 2 11-21-2006 03:02 AM
9.0 - 10.1 official comparision Nau Mandriva 1 04-11-2005 09:08 AM
comparision Ammad Linux - Networking 1 03-10-2005 05:26 AM
A picture comparision program? vmicho Linux - Software 3 10-27-2004 12:47 PM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 04:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration