| Newsgroups |
gmane.editors.sed.user |
| Message-ID |
<[email protected]> |
On 2015-02-11 01:47, [email protected] [sed-users] wrote:
> sed -i 's@<span class="math">$\(.*\)$</span>@echo \1 \@ge' $1
>
> Above variant fails with the following error:
> sed: -e expression #1, char 49: unterminated `s' command
> By the way, character 49 is the letter o of echo.
The 49 refers to the 49th character of the quoted command which
points to the "e" at the end. So the backslash before the last "@"
prevents sed from seeing that as the delimiter between the
replacement and the flags. If you want a backslash, escape it:
...echo \1 \\@ge
or if it's a mistake, just remove it
...echo \1 @ge
-tim