Print columns matching to specific values

view full story

http://www.unix.com – Hello Friends, I have a CDR file and i need to print out 2 columns with their field position which matches to some constant values, a part of input file Code: CZ=1|CZA=1|DIAL=415483420001|EE=13|ESF=1|ET=[16/04/2012][10:44:46:435]|FF=0|9|MNC=99|MNP=9041|MTC=0|NID=2|NOA=international|ON=1| Code: OutPut 3,DIAL=415483420001|13,NOA=international i need to print out the colums which matches constant "DIAL" and "NOA" values, but the field of these values changing from records to records so i cant print a constant columns like $3 and $13... I tried somet (HowTos)