I have file with lines as per bellow
F1F2F3F4F5F6F7 F8F9
1ZX123400000ABC123 040
1ZX123400000DDL456 040
1ZX123400000ABC123 030
1ZX123400000DDL456 010
=================================
I would like to Identify Lines that have same fields except filed F8
Then based on value of that field remove line with F8 that has higher number
in this example line 1 & 3 are identified and then line 1 is removed because F8 04 > 03
in this example line 2 & 4 are identified and then line 2 is removed because F8 04 > 01
end result is
1ZX123400000ABC123 030
1ZX123400000DDL456 010
I tried using RegExp in Python, Shell
Zeljko Olivera Gaspar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1