ABC:10:A1:ABCA110
ABC:10:A1:ABCA110
ABC:20:A1:ABCA120
DEF:20:D1:DEFD120
GHI:30:G1:GHIG130
GHI:40:G1:GHIG140
JKL:30:J1:JKLJ130
MNO:10:M1:MNOM110
What I'm trying to do is look through a file that consists of four columns (as above). As you can see there are duplicates in
the file, i.e. line 1 & 2. With this scenario I need to change column three, so the first line appends an 'A' to the
value of 'A1'. And then the second line a 'B' is appended to the value 'A1'. The changed output should look like:
ABC:10:A1A:ABCA110
ABC:10:A1B:ABCA110
If there are more then just two duplicates the appended value should be the next letter of the alphabet, and so on.
How the hell can I do this using awk? I've tried and didn't get remotely close to achieving the above.
