Anybody know How could I count the duplicated records like the next example?
Input file (key is in the column 1,4):
0001jose
0001jose
0001jose
0002raul
0002raul
0003james
0001jose
0001jose
0002raul
0002raul
0003james
My desired output would be:
0001jose 03
0002raul 02
0003james 01
0002raul 02
0003james 01
Counter would be in the end (column 10,2) of each record.