I am trying to replace a string on line 2 based on a string value in line 1, is there any way to do that easily ?
Below is the sample file. If TOKEN value is -1, change the value in SYNCLOST to Y if not, ignore.
<REQUEST1>
<PAYEESYNCRS>
<TOKEN>-1</TOKEN>
<SYNCLOST>N</SYNCLOST>
</PAYEESYNCRS>
<PMTSYNCRS>
<TOKEN>0</TOKEN>
<SYNCLOST>N</SYNCLOST>
<BANKACCTFROM>
<BANKID>243374218</BANKID>
<ACCTID>1006000382</ACCTID>
<ACCTTYPE>CHECKING</ACCTTYPE></BANKACCTFROM></PMTSYNCRS>
<RECPMTSYNCRS>
<TOKEN>-1</TOKEN>
<SYNCLOST>N</SYNCLOST>