How to write current Date dynamically in a file

Hi,

I have a requirement where I need to write the current date to the file.
This remaining content of this file does not change and we use this file to concat with another one.

Only thng is that I need to write the date to say, record number 10 of this file everyday.
Can this be done in my ksh.

e.g

AADjndfj
dweced
dew
dswhdx
CURRENT DATE
xndxwdxew
cdfcedc
dcfecf
dcfdwq

Appreciate your responses.
Thanks,
Sree

sed "s/CURRENT DATE/`date`/" file >temp 
mv temp file

I assumed CURRENT DATE as a string in the file.

If you want to include after particular line

sed "10 i\\
`date`" file > temp
mv temp file

Thanks Anbu.

just for my explanation (for an unix learner like me) -

This is going to replace the string 'CURRENT DATE' with the value of the current date - Am I right?

you are right

Hi Anbu,

This is giving me a value like as follows -

Tue Oct 17 16:53:45 EDT 2006

What if I want only 'Tue Oct 17 2006' to display. I dont want the hh:mm:ss EDT part.

Thanks
Sree.

date +%a" "%b" "%d" "%Y

If above doesnt work check man date to get the correct options