Quote:
Originally Posted by gosha
why?
|
Recognize that the command is being passed from the shell to
sed, &
each consumes a leading backslash as an
"escape" if given the chance. The reason single quotes works is because this tells the shell that the enclosed string is to be passed to sed
as is without the shell consuming the leading backslash(s).
In other words, enclosing the argument in single quotes actually passes the necessary information on to
sed.