- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- cron and date command options for output
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
02-25-2004 06:01 AM
02-25-2004 06:01 AM
I'd like the date format to be Year Month Day as numbers like the following:
"20040229"
I can't seem to get it to work and I think it may be a bug in cron.
Here's my command in cron:
10 15 24 2 * /opt/ignite/bin/make_tape_recovery -AIv > /home/js4519su/mtr_out.$(/usr/bin/date +%Y%m%d)
This work when I perform the command outside of cron. It also works for "at" however, in cron, the file gets named as follows:
"/home/js4519su/mtr_out."
When I do it outside of cron or in "at" the file name is created as expected:
"/home/js4519su/mtr_out.2004"
Any ideas????
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2004 06:05 AM
02-25-2004 06:05 AM
Re: cron and date command options for output
I would do a little script for the whole thing:
DATE=$(/usr/din/date +%Y%m%d)
FILE=/home/js4519su/mtr_out.${DATE}
/opt/ignite/bin/make_tape_recovery -AIv > ${FILE}
Then put the name of your script as the cron entry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2004 06:51 AM
02-25-2004 06:51 AM
Re: cron and date command options for output
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2004 06:56 AM
02-25-2004 06:56 AM
Re: cron and date command options for output
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2004 09:54 AM
02-25-2004 09:54 AM
Re: cron and date command options for output
Thanks,
Jay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2004 06:16 AM