I have a column in my excel as below:
REF
---------
BV1013_1
BV1013_1
BV1013_2
BV1013_2
BV1026
BV1040
BV1040
BV1041
BV1041
BV1042
BV1042
Desired OUTPUT: Some of the cell values/names are same at several places. I would like to rename my cell names as below based on their number of occurrences.
REF Desire
-----------------------
BV1013_1 BV1013_1_1
BV1013_1 BV1013_1_2
BV1013_2 BV1013_2_1
BV1013_2 BV1013_2_2
BV1026 BV1026_1
BV1040 BV1040_1
BV1040 BV1040_2
BV1041 BV1041_1
BV1041 BV1041_2
BV1042 BV1042_1
BV1042 BV1042_2
I would like to solve this in excel or using bash scripting. Any help is very valuable for me.
Using Miller (https://github.com/johnkerl/miller) starting from
and running
you will have