Script to extract the fields in the agiml tags
Dear all,
please see the logs shown below:
12-12 08:47:37.545 DBG AGIML SERVER[1]..............................write() (<agiml><header><responsetype>TOPUP</responsetype></header><response><auditfields/><resultcode>999</resultcode>
<account>9773575450</account><transno>1317</transno><incode>BPL</incode><resultdescription></resultdescription><inresultcode>1</inresultcode><inmtransno>229051853686229</inmtransno><flowControlCode></flowControlCode><flowControlLevel></flowControlLevel><intransno></intransno><acls/><authorities/><records/></response></agiml>)
Now i want to write a script which will extract the fields like this
TOPUP,9773575450,1317,BPL,1
these are the fields shown in the different tags.
And one thing more the fields between the tag <agiml>............</agiml>,
it is taking it a single column of log.
example less file | grep "9773575450"
will display the whole line.
|