Wednesday, May 13, 2015

unix sed command to replace & with & , " with ", < with <, > with >


sed command to replace &quot; with "

sed -ie 's/&quot;/"/g' test.xml

sed command to replace &amp; with &

sed -ie 's/&amp;/&/g' test.xml

sed command to replace &lt; with <

 sed -ie 's/&lt;/</g' test.xml

sed command to replace &gt; with >

 sed -ie 's/&gt;/>/g' test.xml

No comments:

Post a Comment