when tailing a log file, we might use:
tail -f foo.log | grep bar
if we want to change the grep argument, we have to ctrl-c and then change the argument and then restart the command.
my question is - is there a way to dynamically change what we are grepping for without having to kill the tail/grep commands?
Also looking for a way to do this with less
instead of tail
if possible.
I get that you are after a filtered, autoscrolling view of something.
The less man page states this about the F command:
And the following about the & command
Note that these are less commands, not command line switches.
You still have to abort the autoscrolling to change the pattern, but you do so without actually leaving
less
.