Hi,
I have the following input in a file & need output as mentioned below(need counter of every occurance of field which is to be increased by 1).
Input:
919143110065
919143110065
919143110052
918648846132
919143110012
918648873782
919143110152
919143110152
919143110152
919143110152
Output:
919143110065,1
919143110065,2
919143110052,1
918648846132,1
919143110012,1
918648873782,1
919143110152,2
919143110152,3
919143110152,4
919143110152,5
present code which needs modification is as follows(it counts the uniq count). Please help
awk 'count[$1]++}END{for (i in count) print i","count}' input