Home » Infrastructure » Linux » date field in file name
date field in file name [message #181065] Thu, 06 July 2006 10:10 Go to next message
Messages: 284
Registered: March 2005
Senior Member

From my previous topic I want to try and get the script to produce a log file which includes the date stamp


> daily_report.`date "+\%Y\%m\%d_\%H\%M"`.log 2>&1

from other cron jobs on the system this produces something similar to

so you can see that the date and time are nicely formated. However when I run with the above syntax I get the following output


how can I remove the '\' characters



ps I do not know how to script and am just picking it up as I go along
Re: date field in file name [message #181077 is a reply to message #181065] Thu, 06 July 2006 11:28 Go to previous message
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
YYMMDDHHMM=`date +%y%m%d_%T`
Previous Topic: creating a cron job fails
Next Topic: Listener Problem on Suse 9.3 and Oracle 10g
Goto Forum:

Current Time: Mon May 27 05:32:59 CDT 2024