- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Newbie date question
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
04-28-2003 10:04 AM
04-28-2003 10:04 AM
I have what I think is a very simple question. Each monday I need the date of the following Friday. Is there a command for this?
This is my first posting so I hope that I'm in the right category.
TIA, David
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2003 10:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2003 10:23 AM
04-28-2003 10:23 AM
Re: Newbie date question
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2003 10:31 AM
04-28-2003 10:31 AM
Re: Newbie date question
FRIDAY=$(caljd.sh $(caljd.sh -n 4))
echo "Friday = ${FRIDAY}"
becomes
FRIDAY=$(caljd.sh -S "-" -y $(caljd.sh -n 4))
echo "Friday = ${FRIDAY}"
Pretty simple, huh?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2003 11:09 AM
04-28-2003 11:09 AM
Re: Newbie date question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2003 12:40 PM
04-28-2003 12:40 PM
Re: Newbie date question
Now I have a different problem My script works great when I run from the shell but fails when I run it from cron. I've checked my cron entry and it looks ok.
TIA, David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2003 12:43 PM
04-28-2003 12:43 PM
Re: Newbie date question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2003 01:03 PM
04-28-2003 01:03 PM
Re: Newbie date question
http://hpux.connect.org.uk/hppd/hpux/Gnu/sh_utils-2.0/
This will give your, among other things, the Gnu version of the date command. Then you can do something like:
qe2l1:/home/bdouglas> /opt/sh_utils/bin/date -d "+4 days" +%Y-%m-%d
2003-05-02
The commands are installed in /opt/sh_utils/bin and the man pages in /opt/sh_utils/man, so it is fairly easy to keep them seperate from the normal HP-UX versions of these commands.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2003 01:10 PM
04-28-2003 01:10 PM
Re: Newbie date question
If you get GNU date, you can even use a more friendly language:
$ date --date 'next friday'
Regards,
Olivier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2003 01:29 PM
04-28-2003 01:29 PM
Re: Newbie date question
Many questions like yours have been answered in detail before. At the left of the Forum pages is a "search" link. You can use it to search for Forum threads matching any keyword(s) of your choice. While this is not intended to satisfy all needs, you will a wealth of hints, opinions, and often different ways of approaching a problem. Welcome to the ITRC Forum.
Regards!
...JRF...