- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to manipulate date inside 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
Discussions
Discussions
Forums
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
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-28-2003 03:07 AM
тАО10-28-2003 03:07 AM
Regards,
Augusto
Solved! Go to Solution.
- Tags:
- date arithmetic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2003 03:17 AM
тАО10-28-2003 03:17 AM
Solution- Tags:
- caljd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2003 03:55 AM
тАО10-28-2003 03:55 AM
Re: How to manipulate date inside a shell script
Thank you for the help. The script you sent me is very powerfull. I've got one more question: Is the script able to treat bi-sixth years ?
Regards,
Augusto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2003 04:01 AM
тАО10-28-2003 04:01 AM
Re: How to manipulate date inside a shell script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2003 04:12 AM
тАО10-28-2003 04:12 AM
Re: How to manipulate date inside a shell script
Regards,
Augusto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2003 04:23 AM
тАО10-28-2003 04:23 AM
Re: How to manipulate date inside a shell script
I've tested your script and it works for bi-sixth years:
$ ./24089.sh -e 01 03 2000
2451605
$ ./24089.sh -e -p 1 2451605
29 02 2000
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2003 04:31 AM
тАО10-28-2003 04:31 AM
Re: How to manipulate date inside a shell script
Try this:
caljd.sh 2 28 2000
2451603
Now let's send in the next Julian day and see what the Gregorian Date is.
caljd.sh 2451604
02 29 2000
Now let's send in two days later:
caljd.sh 2451605
03 01 2000
Now for a quick method to determine the day after 2 28 2000.
DT=$(caljd.sh $(caljd.sh -n 1 2 28 2000))
echo "${DT}"
2 29 2000
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2003 04:38 AM
тАО10-28-2003 04:38 AM
Re: How to manipulate date inside a shell script
Thanks a lot,
Augusto