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*

5
  • What about Wood * moretext? should be considered Wood as another occurrence? Or what about Wood buzz *? Wood buzz should be considered as another occurrence too> Commented Dec 8, 2022 at 0:46
  • After the star there is no more text. An occurence of 'Wood buzz *' should not count toward 'Wood'. It should be it's own product. 'Wood buzz' /= 'Wood' Commented Dec 8, 2022 at 0:52
  • 1
    If a product had no star in any file, say 'Lemon', should it be excluded from the output or should it be present as 'Lemon 0'? Commented Dec 8, 2022 at 3:55
  • 4
    If you want help writing a script to count occurrences of strings then provide sample input/output that has multiple occurrences of strings. If you want help writing a script that acts on the appearance or absence of some string/character (e.g. *) then provide sample input/output that includes some lines that do and some that don't have that string/character. We can't test a potential solution using the example you provided where every string from the input appears in the output, there's only 1 occurrence of each string you want counted, and the output counts don't come from the input. Commented Dec 8, 2022 at 12:17
  • Please edit your question and clarify: Can there be stars at any other position? Commented Dec 8, 2022 at 18:44