这里是我的问题:从标准输入中给出任意数量的文本行。
输出:不重复行的数量
输入:
She is wearing black shoes.
My name is Johny.
I hate mondays.
My name is Johny.
I don't understand you.
She is wearing black shoes.
输出:
2
sort -u'而不是使用
uniq'。此外,比较遵守由`LC_COLLATE'指定的规则。这也起作用了... - nils petersohnsort file | uniq -u
和sort -u file
会得到不同的输出。sort -u file
给出了正确的输出。 - Zimano