Question on sed

In Linux: when I say
sed 's/NAME1=test1/NAME1=test1\nNAME2=test2/g' filename > ./tmpfile

Output:
NAME1=test1
NAME2=test2

But in Solaris, I am getting:
NAME1=test1nNAME2=test2

I want the output in solaris as in linux. Please advise.

Thanks
Chiru

use double quotes (") instead of single quotes (')

hope this helps

No, I am still getting it in the same line. :confused:

Give literal ^L (ctrl-L not ^ L) instead of \n

Can you explain in a little detail..on how to give CTRL-L in the script.

Thanks

Just press ctrl-l while typing the script in vi