- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Converting date in a shell script
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
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
10-29-2007 10:12 AM
10-29-2007 10:12 AM
Example:
10/29/07 ---> 29 October 2007
10-29-2007 ---> 29 October 2007
10.29.07 ---> 29 October 2007
etc.....
I need this so that I can grep out information from the certian log files. Because this is going to be run by normal users I am not sure if I can get them to enter the date the same time, every time.
Does any one have suggestions or recommendations on how to do this?
Thanks,
Tim
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2007 10:17 AM
10-29-2007 10:17 AM
SolutionYou can download it from Merijn's website:
http://mirrors.develooper.com/hpux/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2007 11:02 AM
10-29-2007 11:02 AM
Re: Converting date in a shell script
I down loaded it but I am have some diffulty with the syntax. Is there a "help" with Clay's utility?
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2007 11:47 AM
10-29-2007 11:47 AM
Re: Converting date in a shell script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2007 12:41 PM
10-29-2007 12:41 PM
Re: Converting date in a shell script
Mon Oct 29 ... ... ...
this would be the same format that the "date" command would give.
Maybe there is an easier way to do this. I need to get all the entries out of the br_log file for the past 3 months, or from any give date forward.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2007 03:01 AM
10-30-2007 03:01 AM
Re: Converting date in a shell script
maybe someone familiar with clay's date tool can provide further examples in how to do this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2007 03:09 AM
10-30-2007 03:09 AM
Re: Converting date in a shell script
So I imported the br_log file into Excell and striped out the data that I didn't want. This should make management happy.
Thanks again!
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2007 03:11 AM
10-30-2007 03:11 AM
Re: Converting date in a shell script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2007 03:18 AM
10-30-2007 03:18 AM
Re: Converting date in a shell script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2007 03:22 AM
10-30-2007 03:22 AM
Re: Converting date in a shell script
date +"%d %B %E" return (TMHO) exactly what you look for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2007 03:30 AM
10-30-2007 03:30 AM
Re: Converting date in a shell script
When I have some more time I will persue this option. For now Excel will have to job. It is kind of funny that there has not been a utility to sort this information out already created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2007 04:31 AM
10-30-2007 04:31 AM
Re: Converting date in a shell script
Since you changed your requirements from the 1st example to the 2nd example, I decided to output 2 lines for each input argument.
date.pl "10/29/07" "10-29-2007" "10.29.07" "Oct 10, 2007"
should all be handled with ease. You will need to install the Date::Manip module and that will take you about 4 minutes to download and install from www.perl.org/CPAN.
You should be able to take this and run with it even if you make your Perl script a blackbox that is called by a shell script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2007 07:01 AM
10-30-2007 07:01 AM
Re: Converting date in a shell script
I too was thinking the same thing as I imported the br_log file into Excel. Its a sad day when I have to use MS to do my work for me.
Thanks again for all your help.
Tim