sed tricky problem

Hi,

I have a file which contains two strings: AAAAA and BBBBB

I have two variables in my script:

DATE="03/21/2010"
aDate="20100321"

I need to replace string AAAAA with variable $DATE and BBBBB with $aDate. Here is what I do

sed "s/AAAAA/$DATE/" $BASIC_TMPLT | sed "s/BBBBB/$aDate/" > $out_file

But I get an error:

sed: -e expression #1, char 14: unknown option to `s'

Thanks in advance.

Choose a different delimiter for sed's s command.

Thanks. I used '@' and it worked.

sed "s@AAAAA@$DATE@" $BASIC_TMPLT | sed "s/BBBBB/$aDate/" > $out_file
sed "s@AAAAA@$DATE@;s/BBBBB/$aDate/" $BASIC_TMPLT 

By awk

awk -va=$DATE -vb=$aDate '{gsub(/AAAAA/,a);gsub(/BBBBB/,b)}1' urfile