![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| crontab every 2 minutes, 24 hours and once a week | Bobafart | UNIX for Dummies Questions & Answers | 6 | 05-17-2007 10:08 AM |
| Add data in days:hours:min:sec format | krishna_sicsr | Shell Programming and Scripting | 1 | 03-17-2007 11:39 AM |
| Time Difference in seconds | k_bijitesh | UNIX for Advanced & Expert Users | 1 | 01-16-2007 04:15 AM |
| how to display time in minutes n seconds... | santy | Shell Programming and Scripting | 1 | 08-23-2006 10:18 AM |
| Convert minutes to hours, minutes, seconds | Vozx | Shell Programming and Scripting | 1 | 12-09-2005 01:24 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
|
|
||||
|
Difference in day-hours-minutes-seconds format
Hi experts,
I am reading two log files and passing dates as output to a txt file. Code is given below: echo "Start Time:" >> Report.txt cat start.log | while read LINE1 do echo $DATE1 >> Report.txt done echo "End Time:" >> Report.txt cat end.log | while read LINE2 do echo $DATE2 >> Report.txt done The out put: Start Time: Tue, Feb 19, 2008 08:00:02 PM End Time: Wed, Feb 20, 2008 02:19:09 AM Now I want to print the overall time difference between the first output (ie $LINE1) and second output (ie $LINE2)in day-hours-minutes-seconds format. I read the FAQs on subtracting dates, but couldnt find a method to subtract two dates in the above format. Thanks in advance. Sree |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|