- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Date format within a 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
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
07-19-2004 10:02 PM
07-19-2004 10:02 PM
example :
filename=`/bin/date +%y%m%d`
Output : 040720 - CORRECT!
However, I need to create a filename which consists of the date 2 DAYS AGO - ie. 040718
How do I amend the example above to say 'today's date minus 2 days' .....
10 points for the first correct answer!
Simon
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2004 10:08 PM
07-19-2004 10:08 PM
Re: Date format within a script
Take a look at this one :
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=641246
(don't want to answer the same twice :)
Regards,
Fred
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2004 10:16 PM
07-19-2004 10:16 PM
Re: Date format within a script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2004 10:51 PM
07-19-2004 10:51 PM
Re: Date format within a script
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1fb33a7b3682d611abdb0090277a778c,00.html
or
http://www.cmve.net/~merijn/
The bottom of the page under "Other ITRC member contibutions".
Also in this thread there is an example right up your alley.
http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=144178
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2004 12:40 AM
07-20-2004 12:40 AM
Re: Date format within a script
I think i have seen the question today!? okie. see the shell in attachment. it will be useful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2004 12:43 AM
07-20-2004 12:43 AM
Re: Date format within a script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2004 02:11 AM
07-20-2004 02:11 AM
SolutionPREVDATE=$(caljd.sh -s -y -C $(caljd.sh -p 2))
echo "Two days ago was ${PREVDATE}"
This will work across month and year boundaries as well.
Here is caljd.sh, Version 2.23: