We have below format of data in a txt file.Need to add the count(pid) on the basis of pid. Can we put awk logic .
pid Name count(pid)
4 a 24
5 b 22
4 a 21
3 c 20
5 b 4
3 c 43
Below is the expected result Expected result!
pid Name count(pid)
4 a 45
5 b 26
3 c 63