I have a list of strings and some of them are equal. I need some script which would count equal strings. Ex:
I have a list with some words :
"House"
"Dream"
"Tree"
"Tree"
"House"
"Sky"
"House"
And the output should look like this:
"House" - 3
"Tree" - 2
"Dream" - 1
and so on
sort file.txt | uniq -cwill do what you want on unix or cygwin. Otherwise, if this is an assignment, you need to tell us what you tried already and what didn't work about it.