sed with variable

Hi Friends
in sed whether we can use variable.like the following expression.

sed -i 's/ABC/$var/g' filename

I am using Kernel 2.6.18-194.11.1.el5 RedHat linux.

I have tried

sed -i 's/ABC/"$var"/g' filename

, still not working.:frowning:

Please help.

Thanks in advance
Joy

This question has been answered for many many times.
http://www.unix.com/shell-programming-scripting/49369-replace-value-variable-using-sed.html
http://www.unix.com/shell-programming-scripting/5523-pass-variable-sed.html

sed -i "s/ABC/${var}/g" filename