I have a live log file called log.log and want to catch some matching patterns and values in it:
Example: log.log is growing and we are searching for lines that have pattern "ResponseTime = VALUE" and we want to extract the matched VALUE:
I am executing:
tail -F log.log | grep ResponseTime | cut -d = -f 2 | tr -d " "
And I am expecting to see
VALUE1
VALUE2
.. etc
But it is not working ... what should I do?
Thank you, NaMo
===========
Thank you, it works now. I am using: inotail -f log.log | stdbuf -oL grep ResponseTime | stdbuf -oL cut -d '=' -f 2 | stdbuf -oL tr -d " "