m****a 发帖数: 5 | 1 I want to display the count of different words in a text file,will this do?
tr '[A-Z]' '[a-z]'|sort|uniq -c|sort -rn | c*****e 发帖数: 32 | 2
No, sort and uniq is operating by lines not words
【在 m****a 的大作中提到】 : I want to display the count of different words in a text file,will this do? : tr '[A-Z]' '[a-z]'|sort|uniq -c|sort -rn
| p*********f 发帖数: 633 | 3
What is the problem with ``wc -w''?
【在 m****a 的大作中提到】 : I want to display the count of different words in a text file,will this do? : tr '[A-Z]' '[a-z]'|sort|uniq -c|sort -rn
| a**n 发帖数: 313 | 4 Give you a hint, you can use associate array to do it.
【在 m****a 的大作中提到】 : I want to display the count of different words in a text file,will this do? : tr '[A-Z]' '[a-z]'|sort|uniq -c|sort -rn
|
|