Newed a little help on using sed to insert html
I am trying to run a simple sed one liner, but just cannot get it right no matter where i look.
I ned to insert a single line of html into index.php in place.
The line would be:
<a id="goog" href="#" onClick="window.open('test.php','iframe')">test this edit</a>
My one liner is:
sed -i '209 a\\<a id=\"goog\" href=\"#\" onClick=\"window.open(\'test.php\',\'iframe\')\"\>test this edit\<\/a\>' /var/www/html/index.php
I get: syntax error near inexpected token.
It looks to me like everything is escaped a OK, but i just cannot find the issue and its driving me mad.
Anyone able to point out what i expect is an obvious mistake I am just missing?