- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cron and date command options for output
Categories
Company
Local Language
Forums
Discussions
- Integrity Servers
- Server Clustering
- HPE NonStop Compute
- HPE Apollo Systems
- High Performance Computing
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp Software
Knowledge Base
Discussions
Forums
Discussions
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
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