Single quotes and double quotes

Hi guys, I have a sed line in double quotes which works fine, but I want it to be in single quotes

here is the sed line

 
sed "/abc_def/s/\'.*\'/\'\${abc_def}\'/" 

can some one give the equivalent to the above script in single quotes

Thanks a ton

Please provide a definitive example of a before string and an after string. The backslash before the dollar sign makes the purpose of this script ambiguous.

 
 
sed "/abc_def/s/\'.*\'/\'\${abc_def}\'/" < /*<abc_def>*/'1'
 
output should be
 
/*<abc_def>*/'${abc_def}'

Please provide a definitive example of a before string and an after string.

input file: abc.sql

select

/*<abc_def>*/'1' AS abc_def

from

dbc.new_db
sed "/abc_def/s/\'.*\'/\'\${abc_def}\'/" < abc.sql

output should be:

 
select

/*<abc_def>*/'${abc_def}' AS abc_def

from

dbc.new_db

PHEW!!!! here you go..

sed '/abc_def/s/'\''.*'\''/'\''\${abc_def}'\''/' filename

Enclosing characters in single quotes preserves the literal value of each character within the quotes. A single quote may not occur between single quotes, even when preceded by a backslash.
Therefore, you need to terminate the quoted expression, insert the escaped quote, and start a new quoted expression. The shell's quote removal does not add any extra spaces, so in effect you get string concatenation.