Title: Single quote character escape with sed
Author: Sandro Tosi
Last modified: 2005-03-26
Usually, if you need to escape some character, you'll have to use the
``\'' before it. sed uses the single quote character, ', to delimit
its expression. What to do if you have to replace the ' with some
other chars?
Try follow the correct way:
# sed 's/\'/*/' <filename>
and maybe you'll be lucky and it will work.
Otherwise, if the shell gives you a
>
expecting more input after command execution, you have to delimit sed
expression with double quote character, ", instead of ':
# sed "s/'/*/" <filename>
and that's should work fine, without escaping for single quote. |