I need to change date format in XML tags. I have written awk to find-replace date format in command line - echo '2012-01-13' | awk -v FS=- -v OFS=/ '{print $2,$3,$1}' . But not sure how to proceed with using this in XML..
XML used
<OrderNbr>136642</OrderNbr>
<CustomerName>MIKE</CustomerName>
<CustomerType>NEW</CustomerType>
<DateOfBirth>1986-09-03</DateOfBirth>
<LastUpdated>2012-03-28 00:01:02.133</LastUpdated>
Need to change DoB format across XML.
Expected Output:
<OrderNbr>136642</OrderNbr>
<CustomerName>MIKE</CustomerName>
<CustomerType>NEW</CustomerType>
<DateOfBirth>09/03/1986</DateOfBirth>
<LastUpdated>2012-03-28 00:01:02.133</LastUpdated>
xmlstarletorxsltproc. Secondly, you should not convert a perfectly good date format into a stupid date format.