In this question, How to 'grep' a continuous stream? , we can have continuous grep on a particular file.
But how about counting the results of grep.
I have tried something like this, but no luck
tail -f logs/log* | grep --line-buffered -c "pattern in here"
EDIT:
Okay, let's say I have a log file that continuously append the word "success" to a file if some operation was completed.
Therefore, the log file would look something like this:
{date} ==> error
{date} ==> error
{date} ==> error
{date} ==> success
{date} ==> error
{date} ==> success
It is continuous, now I want to continuously tail the count of the "success" in all logs
e.g.
log1 ===> 3
log2 ===> 4
log3 ===> 2
Is that possible?