How to print only the unique lines in BASH?

后端 未结 3 1139
北恋
北恋 2020-12-17 08:47

How can I print only those lines that appear exactly once in a file? E.g., given this file:

mountain
forest
mountain
eagle

The output would

3条回答
提交回复
热议问题