AVI.out <detail>named as the RRM .</detail>
AVI.out <detail>Contains 1 RRM .</detail>
AR0.out <detail>named as the tellurite-resistance.</detail>
AWG.out <detail>Contains 2 HTH .</detail>
ADV.out <detail>named as the DENR family.</detail>
ADV.out <detail>Contains 1 SUI1 domain.</detail>
AH7.out <detail>Contains 1 box .</detail>
AH7.out <detail>Contains 11 rich.</detail>
AZM.out <detail>named as the family.</detail>
My desired output file:
AVI.out <detail>named as the RRM .</detail>
AR0.out <detail>named as the tellurite-resistance.</detail>
AWG.out <detail>Contains 2 HTH .</detail>
ADV.out <detail>named as the DENR family.</detail>
AH7.out <detail>Contains 1 box .</detail>
AZM.out <detail>named as the family.</detail>
I would like to remove those detail that appear at the second and keep only those detail at the first row.
Thanks for advice.
Hi gaurav1086,
Can I ask you what is the back story of your awk code?
I not very understand that why the awk code able to print out my desired output result.
Thanks again.
I have implemented the algorithm in the following way:
.if the first field is NOT equal to my stored field(i.e. n)
then 1.print the record.
2.update the stored field.
Otherwise do not do anything.
I have explained it in the most basic way.
Hope you understand. Feel free to ask any questions about it.
Regards.
Gaurav.
thanks for your explanation, gaurav1086
I understand what is the reason of your awk code now ^^
I'm very appreciate it.
Thanks again for your explanation.