find pouticulat tag on a xml string

HI Team i have a bit transaction log file under taht xml response strings are there ( specially on erricsion IN log) i want the response code and his valu only , currenly while i grep this on linux all complete string is comming .

below is my logs :-
2015-05-18 13:01:33,817 UserMsisdn=919813290710,:: CustomerMsisdn=919671055440Stage is TOP:: After reading complete data from IN::accountAfterRefillaccountFlagsactivationStatusFlag1negativeBarringStatusFlag0serviceFeePeriodExpiryFlag0serviceFeePeriodWarningActiveFlag0supervisionPeriodExpiryFlag0supervisionPeriodWarningActiveFlag0accountValue19058offerInformationListexpiryDate20150520T12:00:00+0000offerID2220offerType0startDate20150505T12:00:00+0000expiryDate99991231T12:00:00+0000offerID2692offerType0startDate20100226T12:00:00+0000serviceClassCurrent2742serviceOfferingsserviceOfferingActiveFlag0serviceOfferingID1serviceOfferingActiveFlag0serviceOfferingID2serviceOfferingActiveFlag0serviceOfferingID3serviceOfferingActiveFlag0serviceOfferingID4serviceOfferingActiveFlag0serviceOfferingID5serviceOfferingActiveFlag0serviceOfferingID6serviceOfferingActiveFlag0serviceOfferingID7serviceOfferingActiveFlag0serviceOfferingID8serviceOfferingActiveFlag0serviceOfferingID9serviceOfferingActiveFlag0serviceOfferingID10serviceOfferingActiveFlag0serviceOfferingID11serviceOfferingActiveFlag0serviceOfferingID12serviceOfferingActiveFlag0serviceOfferingID13serviceOfferingActiveFlag0serviceOfferingID14serviceOfferingActiveFlag0serviceOfferingID15serviceOfferingActiveFlag0serviceOfferingID16serviceOfferingActiveFlag0serviceOfferingID17serviceOfferingActiveFlag0serviceOfferingID18serviceOfferingActiveFlag0serviceOfferingID19serviceOfferingActiveFlag0serviceOfferingID20serviceOfferingActiveFlag0serviceOfferingID21serviceOfferingActiveFlag0serviceOfferingID22serviceOfferingActiveFlag0serviceOfferingID23serviceOfferingActiveFlag0serviceOfferingID24serviceOfferingActiveFlag0serviceOfferingID25serviceOfferingActiveFlag0serviceOfferingID26serviceOfferingActiveFlag0serviceOfferingID27serviceOfferingActiveFlag0serviceOfferingID28serviceOfferingActiveFlag0serviceOfferingID29serviceOfferingActiveFlag0serviceOfferingID30serviceOfferingActiveFlag0serviceOfferingID31usageAccumulatorInformationaccumulatorID2212accumulatorValue0accumulatorID2253accumulatorValue0availableServerCapabilities537207364currency1INRlanguageIDCurrent1masterAccountNumber9671055440negotiatedCapabilities0originTransactionIDHR1573404963refillType3**responseCode0segmentationIDN200transactionAmount8600transactionCurrencyINR

below command i used for this no not comming properly.

grep ‘responseCode’ TransactionLog.log.21_05_2015-12|egrep “.*”

expected out put will be : responseCode0


Source: unix

Leave a Reply