Another sed problem

I have a problem with a string variable which needs to be replaced with sed. However the string which needs to be replaced is ${INSTHOME}. It does not matter how I try to delimit it it will not accept the string and tries to resolve the contents which of course it cannot.

Any help will be appreciated.

How does the command looks like? Try to use double quotes instead of single quotes in your sed command.

Regards

$ cat f5
this is a line with ${INSTHOME} in it.
This is not.
$ $ sed 's/${INSTHOME}/a change /' f5
this is a line with a change  in it.
This is not.

It works well with newer versions of sed, try to escape the $ with a backslash:

sed 's/\${INSTHOME}/a change /'

Regards