- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Diff between times
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2003 05:51 AM
06-12-2003 05:51 AM
I will find difference between
2 times in data format in textfile. For Example between Thu 6/12 9:49 and Thu 6/11 17:00 May be exist program or funkiton as shell or awk or perl. All Infos welcome.
Sorry for very bad "Englisch"
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2003 06:12 AM
06-12-2003 06:12 AM
Re: Diff between times
William ted Thu 6/12 9:49 fred ralph
bill ted Thu 6/11 17:00 fred ralph
Using 'grep' and 'sort':
grep '6/11' file.txt | sort
...displays...
bill ted Thu 6/11 17:00 fred ralph
William ted Thu 6/12 9:49 fred ralph
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2003 06:18 AM
06-12-2003 06:18 AM
Re: Diff between times
but my problem lies elsewhere,
I has two time stamps and would like to know, like many time past between them.
Michail Weller
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2003 06:19 AM
06-12-2003 06:19 AM
Re: Diff between times
This sounds like a tricky task to me!
Do you need to find the difference between them in hours, or whole days?
For days you will need to search the forum for A. Clay Stephenson's caljd.sh script. You will need to use sed or awk to extract the date as 6/12 and then use the appropriate options to caljd to output the Julian date. You can then subtract one Julian date from the other.
If you need to calculate the difference in hours or minutes then use the same approach, but you'll need to convert the 9:49 and 17:00 to minutes since midnight and perform a calculation on them.
regards,
Darren
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2003 06:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2003 06:40 AM
06-12-2003 06:40 AM
Re: Diff between times
that was exact, which I had used
Michail Weller
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2003 03:34 AM
06-13-2003 03:34 AM
Re: Diff between times
thus month functioned also correctly must one in line 39 instead of (argv[1 ] ]) (argv[2 ]) write.
Still times thank you
Michail Weller
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2003 03:38 AM
06-13-2003 03:38 AM
Re: Diff between times
I wrote perhaps too fast ... Thank you for your correction. I'll keep it perhaps for another time in the forums.
Best regards.