How to find the particular text stored in the file “data.txt” and it occurs only once

前端 未结 8 1704
暗喜
暗喜 2021-01-11 17:37

The line I seek is stored in the file data.txt and is the only line of text that occurs only once.

How do I go about finding that particular line using linux?

8条回答
  •  鱼传尺愫
    2021-01-11 18:33

    sort data.txt | uniq -c | grep 1

    you will find only one that accures one time

提交回复
热议问题