Reputation: 503
in a first step, I process some files in a python script. Since the script is unchangeable and since it prints out important information, I'd like to save it as xml. Until now, I did: python script.py > Out.xml
But: If there are signs like "&" in the output, they should be converted in xml-chars. How can I do this?
Thanks a lot!
Upvotes: 0
Views: 101
Reputation: 1145
Either change your script to save in XML format or use sed
python script.py | sed -e "s/&/&/" > out.xml
Upvotes: 2