The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Compare date from db2 table to yesterday's Unix system date sasaliasim Shell Programming and Scripting 9 3 Days Ago 08:37 PM
Changing Creation Date to a Prespecified Date of a File In Unix monkfan UNIX for Dummies Questions & Answers 4 11-28-2006 04:15 AM
Subtract 2 months from the date mahekr2000 UNIX for Advanced & Expert Users 5 07-23-2006 09:01 AM
Subtract date & time in diferent rows vanand420 UNIX for Dummies Questions & Answers 1 07-10-2005 05:07 AM
How to subtract 2 hours from 'date' in shell ( /bin/sh ) script ? yairon UNIX for Dummies Questions & Answers 1 06-07-2001 12:23 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-18-2005
Registered User
 

Join Date: Jun 2005
Posts: 1
Subtract two date in unix

I Have a long file like this
123122312 05/06/12
123123456 05/06/14
I want to take the difference of dates in two lines & print difference sidewise for the whole long files.
Pl help me out.
Reply With Quote
Forum Sponsor
  #2  
Old 06-18-2005
zazzybob's Avatar
Registered Geek
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
If you take a look in our FAQ section you will see the datecalc script written by Perderabo. This will do what you want - you will need to extract the dates from your input file, format them, and then pass these as input into datecalc.

Cheers
ZB
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 04:59 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0