I have the below requirement. below is the content of the input file and my expected result
Input file: a.txt
<?xml version="1.0" encoding="UTF-8"?>
<Employee>
<Name>XXXX</Name>
<ID>1233</ID>
</Employee>
<?xml version="1.0" encoding="UTF-8"?>
<Employee>
<Name>YYYY</Name>
<ID>1345</ID>
</Employee>
<?xml version="1.0" encoding="UTF-8"?>
<Employee>
<Name>AAAA</Name>
<ID>1145</ID>
</Employee>
Output File:b.txt
<?xml version="1.0" encoding="UTF-8"?><Employee><Name>XXXX</Name><ID>1233</ID></Employee>
<?xml version="1.0" encoding="UTF-8"?><Employee><Name>YYYY</Name><ID>1345</ID></Employee>
<?xml version="1.0" encoding="UTF-8"?><Employee><Name>AAAA</Name><ID>1145</ID></Employee>
I am aware that we can acheive the output by using the below perl command
perl -plne 'BEGIN {$/=""} s/>\s*</></g' a.txt > b.txt
Could some one suggest a way to acheive the same using UNIX commands?
Thanks in Advance