most
most copied to clipboard
Displaying a filtered subset of the file in tail mode?
Is there any way to get "most" to display a filtered version of the file contents when in tail mode?
For example, I'd like to view a growing log file with certain lines being ignored. I'd like to be able to force the non-display of those ignored lines via regular expressions.
For example, suppose the following types of lines are appearing in an ever-growing log file ...
...
Item 1 - running program xyz
Item 2 - program xyz failed
Item 3 - running program abc
Item 4 - running program def
Item 5 - program abc succeeded
Item 6 - program def failed
...
And suppose that I can specify something like the following regex:
ignore = /^.*running program.*$/
I would then just like to see lines like the following appearing in the output of "most" when running in tail mode ...
...
Item 2 - program xyz failed
Item 5 - program abc succeeded
Item 6 - program def failed
...
Is there any way to get "most" to behave this way?
On Wed, 02 Aug 2023 13:57:35 -0700, TheHippoMan @.***> said:
Is there any way to get "most" to display a filtered version of the file contents when in tail mode?
There is a way but perhaps not what you had in mind:
tail -f /some/log/file | egrep --line-buffered pattern > /tmp/foobar most /tmp/foobar
Apart from that, I have no other suggestion.
Good luck, --John
For example, I'd like to view a growing log file with certain lines being ignored. I'd like to be able to force the non-display of those ignored lines via regular expressions.
For example, suppose the following lines appear in an ever-growing log file ...
... Item 1 - running program xyz Item 2 - program xyz failed Item 3 - running program abc Item 4 - running program def Item 5 - program abc succeeded Item 6 - program def failed ...
And suppose that I can specify something like the following regex:
ignore = /^.*running program.*$/
I would then just like to see lines like the following appearing in the output of "most" when running in tail mode ...
... Item 2 - program xyz failed Item 5 - program abc succeeded Item 6 - program def failed ...
Is there any way to get "most" to behave this way?
-- Reply to this email directly or view it on GitHub: https://github.com/jedsoft/most/issues/19 You are receiving this because you are subscribed to this thread.
Message ID: @.***>