Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

`date' issue

Status
Not open for further replies.

gatetec

MIS
Mar 22, 2007
420
US
In crontab, I have:

/u02/oracle/admin/gold/refresh_gold.ksh > /mgr/log/refresh_gold.`date` 2>&1

The log name resturns as:

refresh_gold.Fri Jan 18 15:14:03 EST 2008

whereas I wanted to have like:

refresh_gold.06Jul120900Wed
refresh_gold.06Jul140900Fri

Please advise.

thx
 
The date command has all sorts of options. Too see all of them, pull up a man page: man date.

Here's an example that I use all the time:
date "+%m%d%y
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top