Hi All,
i have a file which have many fields delimited by ,(comma)
now i have to show only few fields and not all.
the sample text file looks like this:
TYPE=SERVICEEVENT, TIMESTAMP=05/06/2009 11:01:40 PM, HOST=sppwa634, APPLICATION=ASComp, FUNCTION=LimitsService, SOU
RCE=com.example.as.limits.ejb.LimitsServiceBean, SOURCE_METHOD=getLimitsList, MESSAGE=Failed to execute the
CAS Limits Transaction via tfwk2.0 - due to SORResponseException: com.example.util.transfwk.exception.SORR
esponseException : Timed out in receive for CorrelationID:ID:414d512053505057413633342020202049fb54cf2a1a5dd0 from:
CASA:JMSWrapper : receive() :Timed out waiting for response for a correlation id : [ID:414d512053505057413633342020
202049fb54cf2a1a5dd0]QCFPoolName : [CASQCF] and ResponseQueueName : [MYCA_CAS_REPLY_QUEUE] Timeout[10000]for Card N
umber : , SESSION_ID=b302cbd0-8d67a6e6-e3f371bd-d2561b0d, GUID=null, CARD_TYPE=null, ENTRY_URL=account, STATUS=fals
e, TIME_TO_EXECUTE=36079, MARKET_IDENTIFIER=null, FAILED_SYSTEM=null, FAILURE_CATEGORY=null, FAIL_REASON_TEXT=null
Form this file if i want to remove fields APPLICATION and SOURCE_METHOD both ending with a ,
i am using this line
cat myfile | tr -d 'APPLICATION' 'SOURCE_METHOD'
But this command is not working properly
It is giving output like this:
YE=SERVEEVE, MESM=05/06/2009 11:01:40 M, HS=sppwa634, =Somp, FU=imitsService, SURE=com.example.as.limits.ej
b.imitsServiceBean, SURE_MEHD=getimitsist, MESSGE=Failed to execute the S imits ransaction via tfwk2.0 - due to SRR
esponseException: com.example.util.transfwk.exception.SRResponseException : imed out in receive for orrelat
ionD:D:414d512053505057413633342020202049fb54cf2a1a5dd0 from:S:JMSWrapper : receive() :imed out waiting for respons
e for a correlation id : [D:414d512053505057413633342020202049fb54cf2a1a5dd0]QFoolame : [SQF] and ResponseQueueame
: [MY_S_REY_QUEUE] imeout[10000]for ard umber : , SESS_D=b302cbd0-8d67a6e6-e3f371bd-d2561b0d, GUD=null, RD_YE=null,
ERY_UR=account, SUS=false, ME__EXEUE=36079, MRKE_DEFER=null, FED_SYSEM=null, FURE_EGRY=null, F_RES_EX=null
It is not removing the complete fields but removing some letters from every field.
Please advice.
Thanks