Skip to content

Instantly share code, notes, and snippets.

@AggroBoy
Created September 26, 2011 13:44
Show Gist options
  • Save AggroBoy/1242257 to your computer and use it in GitHub Desktop.
Save AggroBoy/1242257 to your computer and use it in GitHub Desktop.
XML escaping SED script
sed -e 's~&~\&amp;~g' -e 's~<~\&lt;~g' -e 's~>~\&gt;~g' -e 's~\"~\&quot;~g' -e "s~\'~\&apos;~g"
@AggroBoy
Copy link
Author

Always needing a sed script for this, and found one on the net; looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment