How can I use the output of a command while while working with sed?

Hi guys,

I was facing problems with the following scenario for the last several hours, can anyone help me out?

rm -f /www/emailout/template.html

TODAY=`date '+%d-%m-%y'`

DBRUN=`ps ax | grep dtd `

sed -e 's/ncTODAY/'"$TODAY"'/g' -e "s/ncdbrun/'"$DBRUN"'/g" /www/emailout/test1.html > /www/emailout/template.html

But, I can't get the output of $DBRUN ?

What would be the solution, can anyone please fix the problem for me?

Geek Guide
The DevOps Toolbox

Tools and Technologies for Scale and Reliability
by Linux Journal Editor Bill Childers

Get your free copy today

Sponsored by IBM

8 Signs You're Beyond Cron

Scheduling Crontabs With an Enterprise Scheduler
On Demand
Moderated by Linux Journal Contributor Mike Diehl

Sign up and watch now

Sponsored by Skybot