Hi I'm very new to unix and awk. here is what I want.
For ex: In input file FILE, * is the delimiter
If the file is :
ABC*12*avxcgju932*00**123*12345678iouyt*18*123nhtrkw *qw02334056518*1121211*U*00200*000000449*0*T*:!QR*XA*abcdefjpirewr*123rtyey145*19951212*1234*abc*Z*12345!XV*525*12345!CVB*99*123456789*
The script should look for QR and then if the next field is XA, then it should change the 6th field from there from a Z to K.
Th O/P should be like this:
ABC*12*avxcgju932*00**123*12345678iouyt*18*123nhtrkw *qw02334056518*1121211*U*00200*000000449*0*T*:!QR*XA*abcdefjpirewr*123rtyey145*19951212*1234*abc*K*12345!XV*525*12345!CVB*99*123456789*
TIA.
For ex: In input file FILE, * is the delimiter
If the file is :
ABC*12*avxcgju932*00**123*12345678iouyt*18*123nhtrkw *qw02334056518*1121211*U*00200*000000449*0*T*:!QR*XA*abcdefjpirewr*123rtyey145*19951212*1234*abc*Z*12345!XV*525*12345!CVB*99*123456789*
The script should look for QR and then if the next field is XA, then it should change the 6th field from there from a Z to K.
Th O/P should be like this:
ABC*12*avxcgju932*00**123*12345678iouyt*18*123nhtrkw *qw02334056518*1121211*U*00200*000000449*0*T*:!QR*XA*abcdefjpirewr*123rtyey145*19951212*1234*abc*K*12345!XV*525*12345!CVB*99*123456789*
TIA.