Hi,
I would like to get rid of all comment in an xml file by grep or sed command:
The content seem like this:
<!-- ab cd
ef gh
ij kl -->
Anyone can help?
Thanks and Regards
Hi,
I would like to get rid of all comment in an xml file by grep or sed command:
The content seem like this:
<!-- ab cd
ef gh
ij kl -->
Anyone can help?
Thanks and Regards
this will delete that part
sed '/<!--/,/-->/d' filename
it works!!
thank you very much!!
perl:
undef $/;
my $str=<DATA>;
$str=~s/<!--.*?>\n//gs;
print $str;
__DATA__
<!-- ab cd
ef gh
ij kl -->
line 1
<!-- ab cd
ef gh
ij kl -->
line 2