I have huge text file of such format:
aaa bbb 1
aaa ccc 2
aaa ddd 3
bbb ww 1
bbb kio 3
I want to aggregate it and the result should be:
aaa bbb 1/6
aaa ccc 2/6
aaa ddd 3/6
bbb ww 1/4
bbb kio 3/4
3rd column – probability p(y|x)
How should I do that using awk, sed?
Output