Quote:
|
Originally Posted by gauravgoel
Hi Vino,
With due regards, I would like to say that the above may not solve the problem, OP is having. He is looking for no. of occurence of a character in a string. And the above command will give always give output as 1 if there is one or more than one occurence of "r"
Kindly correct me if I am wrong
Gaurav
|
You are right. It gives 1. -c gives a count of the number of lines where the character occurs.
Good catch.