I got stuck with a rather simple task (which is even more frustrating ;-) ): I have a column like this:
>foo111_bar37
>foo111_bar38
>foo111_bar40
>foo111_bar40
>foo111_bar41
>foo111_bar42
>foo111_bar49
>foo111_bar49
>foo111_bar49
...
and I would like to either modify this column or get a new column, that includes the current count of the same string
>foo111_bar37x1
>foo111_bar38x1
>foo111_bar40x1
>foo111_bar40x2
>foo111_bar41x1
>foo111_bar42x1
>foo111_bar49x1
>foo111_bar49x2
>foo111_bar49x3
...
goal is that the line becomes unique and still contains the original information. I found out how to adress the column with awk and change strings in general (e.g. always appending "x1"), but not how to do this with number-specific changes. Most people seem to want to get rid of their duplicates or count the total number of duplicates, this is not helping me here.
BTW: I'm using the MobaXterm bash environment on Windows
Thanks a lot!