Re: [OFF-TOPIC] less with built-in grep ?
In debian-user, Ben Pfaff <pfaffben@pilot.msu.edu> wrote:
> With the example above, I suppose I could write some kind of macro,
> opening shell output, but it gets much more interesting when I am
> looking at
>
> program | less
>
> and I do not want to execute program again, and I also want to be able
> to go back to un-grepped output without executing program again.
>
>You can type |grep xxx | less, and this will open a sub-less with the
>grep output in it. To get back to the ungrepped file, just quit from
>the sub-less.
Yes, only now the program isn't finished yet, and I want to do a 'F' (makes
less act like tail -f) command.
This is not just some fun feature I want to have to look at, it comes in
useful when you're looking at, say, a syslog, or program output. I have a
window with my syslog, and I want to only see lines corresponding to a
certain regexp. I don't know how to do that.
No, the regexp is not something I could use /etc/syslog.conf for. No
dreaming. Anyway, modifying syslog.conf just for a few minutes is just
terrible, and would only work for syslog in any case. In addition, if the
less selected the lines for me, I would be able to quit that and see the
context.
In effect, I want to put an egrep filter in less, with a regexp that could
be modified without restarting less or re-reading file.
Hmmm ... there might be some specialized real-time log monitor which would
let me do that ?
I think I'll be forwarding this to markn, less author. Should be rather
simple, and ... is there anyone else that thinks it might be useful ?
--
E-mail the word "unsubscribe" to debian-user-request@lists.debian.org
TO UNSUBSCRIBE FROM THIS MAILING LIST. Trouble? E-mail to listmaster@debian.org .
Reply to: