- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Is there an HP supported version of the "date"...
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
тАО04-12-2005 04:14 AM
тАО04-12-2005 04:14 AM
Solved! Go to Solution.
- Tags:
- date arithmetic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2005 04:18 AM
тАО04-12-2005 04:18 AM
Re: Is there an HP supported version of the "date"command which has the -yesterday option?
gnu date command has that option.
- Tags:
- gnu date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2005 04:46 AM
тАО04-12-2005 04:46 AM
Re: Is there an HP supported version of the "date"command which has the -yesterday option?
But I've heard HP supports some GNU commands. Any way to verify if the GNU date command is supported?
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2005 04:57 AM
тАО04-12-2005 04:57 AM
SolutionIf you must use HP "supported" tools then use Perl. A combination of time() - 86400 + the localtime (or strftime) function will do anything the date command will do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2005 05:14 AM
тАО04-12-2005 05:14 AM
Re: Is there an HP supported version of the "date"command which has the -yesterday option?
--8<---
* How do I print Yesterday?
d3:/ 102 > echo 'Yesterday'
Yesterday
d3:/ 103 > perl -le 'print scalar localtime time - 86400'
Or use A.Clay Stephenson's date hammer, which can also be used for more complicated actions from the command line, as will using the modules Date::Calc or Date::Manip with Perl.
-->8---
A.Clay's valuable date hammer can be found on several places on this forum. It is available in either a widely supported Perl version or an even more widely supported shell version. Both also available on my site (follow the lnks in that FAQ page)
BTW GNU date (in GNU coreutils) available at http://hpux.connect.org.uk/hppd/hpux/Gnu/coreutils-5.2.1/ also by HP
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2005 05:16 AM
тАО04-12-2005 05:16 AM
Re: Is there an HP supported version of the "date"command which has the -yesterday option?
Thank you for that. That's an extremely easy statement to embed in my shell scripts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2005 05:41 AM
тАО04-12-2005 05:41 AM
Re: Is there an HP supported version of the "date"command which has the -yesterday option?
Internet Express" package. It mostly
consists of higher-level packages like
Eclipse, Samba, etc. though it does
include a few lower-level items like
bash and vim:
http://www.hp.com/products1/unix/operating/internet/express.html
http://www.docs.hp.com/en/5991-0748/index.html
The Linux porting kit and STK might also
contain some GNU tools:
http://devrsrc1.external.hp.com/LPK/
http://devrsrc1.external.hp.com/STKL/index.html