Number of non repeating lines - unique count

后端 未结 2 1340
半阙折子戏
半阙折子戏 2020-12-29 18:14

Here is my problem: Any number of lines of text is given from standard input. Output: number of non repeating lines

INPUT:

She is we         


        
2条回答
  •  南方客
    南方客 (楼主)
    2020-12-29 18:24

    You could try using uniq man uniq and do the following

    sort file | uniq -u | wc -l
    

提交回复
热议问题