RE: UNIX script

  • From: "Mercadante, Thomas F" <thomas.mercadante@xxxxxxxxxxxxxxxxx>
  • To: "'sjaffarhussain@xxxxxxxxx'" <sjaffarhussain@xxxxxxxxx>, oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 29 Mar 2005 07:54:15 -0500


Try this:

DATETIME="`date '+%Y%m%d'`_`date '+%H%M%S'`"
ls -ltr > $FILENAME


-----Original Message-----
From: The Human Fly [mailto:sjaffarhussain@xxxxxxxxx] 
Sent: Tuesday, March 29, 2005 7:45 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: UNIX script

Hello list,

Sorry, its slightly off-topic, UNIX related.

My requirement is whenever I divert my output to a file, that should
contains filename along with the data and time.

For example,

ls -ltr > xyz

and next time when I do the same, it should ot overwite to the file,
instead create the file with date and time along with it.

Best Regards,
Jaffar, OCP DBA
Banque Saudi Fransi
Saudi Arabia
"It is your atittude, not your aptitude that determins your altitude."

Other related posts: