I know I have already asked a similar question and the answer was awesome!...But it turns out I need something slightly different. I have a space delimited text file with thousands of lines, COLA.TXT that looks for example like this:
AA 123 456 789
AA 987 987 987
AA 987 988 888
AA 999 999 999
B 123 456 789
B 111 111 111
CCD 123 456 789
CCD 321 654 987
CCD
EE 11 11
EE
EE
EE 00 00 00
EE
Now I need to delete all the last lines of each "section" (sections are determined by the first field of each line)
sample output
AA 123 456 789
AA 987 987 987
AA 987 988 888
B 123 456 789
CCD 123 456 789
CCD 321 654 987
EE 11 11
EE
EE
EE 00 00 00