Operating System - HP-UX
1752795
Members
6456
Online
108789
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО05-08-2002 11:34 AM
тАО05-08-2002 11:34 AM
Mr. Stephenson,
Just downloaded your script and it's great. One question for you though regarding this usage:
cal.sh -Y -s $(cal.sh -p 1)
This produces yesterday's date in the following format:
20020507
Does this work across years, so that when I run this script on 20030101, it will still output 20021231?
Does this have any problems with leap years?
Are there any downfalls with using this when I always want to produce only yesterday's date?
I'm sure I'm just being paranoid (what sysadmin isn't a little paranoid) but I'll sleep better hearing it from the Author's fingertips.
tx,
c
Just downloaded your script and it's great. One question for you though regarding this usage:
cal.sh -Y -s $(cal.sh -p 1)
This produces yesterday's date in the following format:
20020507
Does this work across years, so that when I run this script on 20030101, it will still output 20021231?
Does this have any problems with leap years?
Are there any downfalls with using this when I always want to produce only yesterday's date?
I'm sure I'm just being paranoid (what sysadmin isn't a little paranoid) but I'll sleep better hearing it from the Author's fingertips.
tx,
c
Solved! Go to Solution.
- Tags:
- caljd
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-08-2002 11:43 AM
тАО05-08-2002 11:43 AM
Solution
Hi Charles:
Does a hog like slop? Julian days count sequentially from 4713BCE to far into the future. They are used by astronomers to simplify orbital calculations. It knows all about leap years, about century years not being leap years (unless divisble by 400) and it knows all this without a single if statement. It also does "30 Days hath September ..." without an if statement. By the way, there is a newer Perl based version 'caljd.pl' with exactly the same arguments/options as caljd.sh.
I suggest that you download caljd.pl and try it as well; it executes quite a bit faster than the Shall/awk based 'caljd.sh'.
Version 2.05 is the latest version of both.
Regards, Clay
Does a hog like slop? Julian days count sequentially from 4713BCE to far into the future. They are used by astronomers to simplify orbital calculations. It knows all about leap years, about century years not being leap years (unless divisble by 400) and it knows all this without a single if statement. It also does "30 Days hath September ..." without an if statement. By the way, there is a newer Perl based version 'caljd.pl' with exactly the same arguments/options as caljd.sh.
I suggest that you download caljd.pl and try it as well; it executes quite a bit faster than the Shall/awk based 'caljd.sh'.
Version 2.05 is the latest version of both.
Regards, Clay
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-08-2002 12:01 PM
тАО05-08-2002 12:01 PM
Re: caljd.sh
Thanks - that's what I needed.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP