sed '/<!--/,/-->/d' /target/file.xmlUse sed -i save the changes back into the file.
Wednesday, October 20, 2010
Remove XML Comments with sed
This should work for HTML also:
Subscribe to:
Post Comments (Atom)
Lol that does not work it's a train check, I think I'll just try Perl for this. it doesn't help that sed behaves differently on Linux vs Mac, whereas Perl is Perl... same goes for Python
ReplyDeleteJust tried it again. Worked great... On Linux. The moral of the story is: Don't use a Mac.
ReplyDelete