I am new to awk and I have a FIXML file that I want to search a string and replace with a counter. Here is the file.
<FIXML> <TrdCaptRpt AvgPxInd="1" RptID="40104" LastQty="15" LastPx="2910" TrdDt="2005-04-19" TxnTm="2005-05-17T10:30:00" TransTyp="0" RptTyp="0" </FIXML> <FIXML> <TrdCaptRpt LinkID="GRPGRPID" AvgPxInd="1" RptID="40104" LastQty="15" LastPx="2910" TrdDt="2005-04-19" TxnTm="2005-05-17T10:30:00" TransTyp="0" RptTyp="0" </FIXML>
I have a huge file and want to replace it with incrementing counter at the LinkID="GRPGRPID" as LinkID="GRP1" and LinkID="GRP2" and so on.
Is it possible to use awk and sed to achieve it. Thanks for the help.
<FIXML> <TrdCaptRpt AvgPxInd="1" RptID="40104" LastQty="15" LastPx="2910" TrdDt="2005-04-19" TxnTm="2005-05-17T10:30:00" TransTyp="0" RptTyp="0" </FIXML> <FIXML> <TrdCaptRpt LinkID="GRPGRPID" AvgPxInd="1" RptID="40104" LastQty="15" LastPx="2910" TrdDt="2005-04-19" TxnTm="2005-05-17T10:30:00" TransTyp="0" RptTyp="0" </FIXML>
I have a huge file and want to replace it with incrementing counter at the LinkID="GRPGRPID" as LinkID="GRP1" and LinkID="GRP2" and so on.
Is it possible to use awk and sed to achieve it. Thanks for the help.