我有一个像这样的文件:
fan apple banana orange mango
cooler apple orange banana mango
cooler apple orange banana mango
cooler apple orange banana mango
fan apple banana orange mango
fan apple banana orange mango
cooler apple orange banana mango
fan apple banana orange mango
现在,当我逐行进行时,我想在范来的那一刻数一数,并且需要增加每个粉丝的计数。喜欢
count 1
fan apple banana orange mango
cooler apple orange banana mango
cooler apple orange banana mango
cooler apple orange banana mango
count 2
fan apple banana orange mango
count 3
fan apple banana orange mango
cooler apple orange banana mango
count 4
fan apple banana orange mango
这就是我想要的输出。帮助表示赞赏...谢谢