Shell script to grep string and its value and produce output in another file
问题 I need to grep value of ErrCode, ErrAttkey and ErrDesc from the below Input file. and need to display as below in another file How can i do this using shell script? Required output ErrCode|ErrAtkey|ErrDesc 003010|A3|The Unique Record IDalreadyExists 008024|A8|Prepaid / Postpaid not specified Input File <TariffRecords><Tariff><UniqueID>TT07PMST0088</UniqueID><SubStat>Failure</SubStat><ErrCode>003010</ErrCode><ErrAttKey>A3</ErrAttKey><ErrDesc>The' Unique Record ID already 'Exists</ErrDesc><