[plug] sed - syntax problem ???
Arie Hol
arie99 at ozemail.com.au
Fri Jun 15 18:04:50 WST 2007
I am learning to use sed on my Windows box (part of the Gnu Utilities
package for Windows)
sed is fast becoming a new friend to me, but I am having some problems.
I am trying to remove some unwanted content from a collection of HTML
files which I have archived from the web.
I am running the following three commands :
sed -ie s/onload=\"window.print()\"// *.html
sed -ie s/urchinTracker();// *.html
sed -ie s/_uacct = "UA-288334-4";// *.html
The first and second commands run successfully, but the third command
returns the following error :
-e expression #1, char 8: Unterminated 's' command
I have tried 'escaping' the character at position 8 in the target string,
but the error just comes back as :
-e expression #1, char 9: Unterminated 's' command
I have also tried several combinations of 'escaping' other characters,
but it has made little difference, the char #: part of the error message
just returns a different number for the position in the target string.
It makes no difference whether I run them from the command line or from
within a batch file !!
What have I missed ?
What am I doing wrong ?
Any advice would be greatly appreciated.
Regards Arie
------------------------------------------------------------------
For the concert of life, nobody has a program.
------------------------------------------------------------------
More information about the plug
mailing list