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

前端 未结 8 1721
暗喜
暗喜 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:18

    sort data.txt | uniq -c | grep 1\ ?*

    and it will print the only text that occurs only one time do not forget to put space after the backslash

提交回复
热议问题