It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

Hello new user. I've edited your question and cleaned it up a little. I kept 3 in there, please edit it if it was a mistake, or explain it if it wasn't. Thanks, and welcome to stack overflow.
–
KobiOct 19 '10 at 5:26

4

If that "3" does not get explained or corrected, I will vote for close in an hour...
–
ThiloOct 19 '10 at 5:36

2

It's either 2 or he meant to just count hello.
–
RuelOct 19 '10 at 5:49

Now, I'm no perl guy, but isn't /hello/ a regex? In that case, you might as well match against it. Also, note that the question asks about "hello hello", which suggests overlapping matches.
–
KobiOct 19 '10 at 5:29

providing more general solution ie., first by splittig the string into words and then check by grep whether it is required word or not.
–
Nikhil JainOct 19 '10 at 5:37

1

how is assuming that matching only needs to be done on word boundaries more general? (especially since "hello hello" is not one word)
–
ThiloOct 19 '10 at 5:39

yes that's true, but i am considering "hello" as one word unless OP explain it more and split string into words because assuming that string may contain words other than "hello".
–
Nikhil JainOct 19 '10 at 5:55