Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 1
    sed: -e expression #2, char 7: unterminated s' command`, also this counts all words, right? But OP asked only a particular one. Also a bit of explanation would be nice. Commented Dec 26, 2016 at 21:19
  • Sorry I had a mistake. I have remade the command plus commented the answer. In my opinion, from the question, it's impossible to know wether he would like to get the ocurrency of only one word or a frequency of occurencies. But in case you would like to get only one word you can add a grep at the end. Commented Dec 27, 2016 at 9:29