26

I'm using less to view log files quite a lot and every so often I'd like to filter the output by hiding lines which contains some keywords.

In less it's possible to filter-out lines with &!<keyword> but that only works for one keyword at a time. I'd like to specify a list of keywords to filter-out. Is this at all possible?

1 Answer 1

33

You can use a regular expression:

 &!cat|dog|fish

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .