4 ms·
From man(1) less: &pattern Display only lines which match the pattern; lines which do not match the pattern are not displayed. If pattern i
by dredmorbius 2y ago
From man(1) less:
&pattern
Display only lines which match the pattern; lines which do not
match the pattern are not displayed. If pattern is empty (if
you type & immediately followed by ENTER), any filtering is
turned off, and all lines are displayed. While filtering is in
effect, an ampersand is displayed at the beginning of the
prompt, as a reminder that some lines in the file may be hidden.
$ less --version
less 487 (GNU regular expressions)
Copyright (C) 1984-2016 Mark Nudelman
- teddyh 2y agoOh, you meant the program “less”! Right, I understand what you meant now.
- dredmorbius 2y ago:-) Yeah. I was viewing some files and thinking "it'd be really cool if less(1) had some way of filtering to just lines matching a specific pattern". RTFM'd and TIL'd. Mind that at that point I'd used less for ... oh, at least 30 years.