From wikipedia:
uniq
-c Generate an output report in default style except that each line is preceded by a count of the number of times it occurred. If this option is specified, the -u and -d options are ignored if either or both are also present.
On my machine it is taking the count number and putting it on the start of each line. What I want is for it to be placed at the end of the line, after a comma. How can this be done?
Example:
aa
aa
bb
cc
cc
dd
Should change to:
aa,2
bb,1
cc,2
dd,1
You can try something like this -
or
or
or
Test:
Test2:
Test3: