/pattern
Search forward in the file for the N-th line containing the pattern. N defaults to 1.
The pattern is a regular expression, as recognized by the regular expression library sup-
plied by your system. By default, searching is case-sensitive (uppercase and lowercase
are considered different); the -i option can be used to change this. The search starts
at the first line displayed (but see the -a and -j options, which change this).
From the "man" page:
/pattern
-a-a-a-a-a-a-a-a-a-a-a-a-a Search forward in the file for the N-th line containing
the pattern.-a N-a defaults-a to-a 1.
-a-a-a-a-a-a-a-a-a-a-a-a-a The pattern is a regular expression, as recognized by
the regular expression library sup-
-a-a-a-a-a-a-a-a-a-a-a-a-a plied by your system.-a By default, searching is case-
sensitive (uppercase-a and-a lowercase
-a-a-a-a-a-a-a-a-a-a-a-a-a are-a considered-a different); the -i option can be used
to change this.-a The search starts
-a-a-a-a-a-a-a-a-a-a-a-a-a at the first line displayed (but see the -a and -j
options, which change this).
I'm running Leap 15.6 (which is where that man page extract came from)
and noticed that my searches are case-insensitive.-a Of course I do not
have -i set but it is possible that OpenSUSE generously sets that option
for me via an alias.
-aFrom the "man" page:
/pattern
-a-a-a-a-a-a-a-a-a-a-a-a-a Search forward in the file for the N-th line containing the
pattern.-a N-a defaults-a to-a 1.
-a-a-a-a-a-a-a-a-a-a-a-a-a The pattern is a regular expression, as recognized by the
regular expression library sup-
-a-a-a-a-a-a-a-a-a-a-a-a-a plied by your system.-a By default, searching is case-
sensitive (uppercase-a and-a lowercase
-a-a-a-a-a-a-a-a-a-a-a-a-a are-a considered-a different); the -i option can be used to
change this.-a The search starts
-a-a-a-a-a-a-a-a-a-a-a-a-a at the first line displayed (but see the -a and -j options,
which change this).
And where do you enter that 'N'?
First time I read this.
On 2025-02-11 at 13:41 Carlos E.R. wrote:
-aFrom the "man" page:
/pattern
-a-a-a-a-a-a-a-a-a-a-a-a-a Search forward in the file for the N-th line containing the
pattern.-a N-a defaults-a to-a 1.
-a-a-a-a-a-a-a-a-a-a-a-a-a The pattern is a regular expression, as recognized by the
regular expression library sup-
-a-a-a-a-a-a-a-a-a-a-a-a-a plied by your system.-a By default, searching is case-
sensitive (uppercase-a and-a lowercase
-a-a-a-a-a-a-a-a-a-a-a-a-a are-a considered-a different); the -i option can be used to
change this.-a The search starts
-a-a-a-a-a-a-a-a-a-a-a-a-a at the first line displayed (but see the -a and -j options,
which change this).
And where do you enter that 'N'?
First time I read this.
From the top of the "man" page:
DESCRIPTION
[rCa] Commands may be preceded by a decimal number, called N in
the descriptions below. The number is used by some commands,
as indicated.
On 2025-02-11 09:44, R Daneel Olivaw wrote:
-aFrom the "man" page:
/pattern
-a-a-a-a-a-a-a-a-a-a-a-a-a Search forward in the file for the N-th line containing
the pattern.-a N-a defaults-a to-a 1.
-a-a-a-a-a-a-a-a-a-a-a-a-a The pattern is a regular expression, as recognized by
the regular expression library sup-
-a-a-a-a-a-a-a-a-a-a-a-a-a plied by your system.-a By default, searching is case-
sensitive (uppercase-a and-a lowercase
-a-a-a-a-a-a-a-a-a-a-a-a-a are-a considered-a different); the -i option can be used
to change this.-a The search starts
-a-a-a-a-a-a-a-a-a-a-a-a-a at the first line displayed (but see the -a and -j
options, which change this).
And where do you enter that 'N'?
First time I read this.
I'm running Leap 15.6 (which is where that man page extract came from)
and noticed that my searches are case-insensitive.-a Of course I do not
have -i set but it is possible that OpenSUSE generously sets that
option for me via an alias.
Searches have always been case insensitive inside less, for decades (in *suse). Since ever. It is the first time I see some one saying they are
not (the manual).
There are a lot of environment variables mentioned in the manual at the
end.
cer@Laicolasse:~> set | grep LESS
LESS='-M -I -R'
LESSCLOSE='lessclose.sh %s %s'
LESSKEY=/etc/lesskey.bin
LESSOPEN='lessopen.sh %s'
LESS_ADVANCED_PREPROCESSOR=no
cer@Laicolasse:~>
There you have.
-a-a-a-a-a-a -M or --LONG-PROMPT
-a-a-a-a-a-a-a-a-a-a-a-a-a Causes less to prompt even more verbose-
-a-a-a-a-a-a-a-a-a-a-a-a-a ly than more(1).
-a-a-a-a-a-a -I or --IGNORE-CASE
-a-a-a-a-a-a-a-a-a-a-a-a-a Like-a -i,-a but searches ignore case even
-a-a-a-a-a-a-a-a-a-a-a-a-a if the pattern contains-a uppercase-a let-
-a-a-a-a-a-a-a-a-a-a-a-a-a ters.
-a-a-a-a-a-a -i or --ignore-case
-a-a-a-a-a-a-a-a-a-a-a-a-a Causes searches to ignore case; that is,
-a-a-a-a-a-a-a-a-a-a-a-a-a uppercase and lowercase-a are-a considered
-a-a-a-a-a-a-a-a-a-a-a-a-a identical.-a-a This-a option-a is ignored if
-a-a-a-a-a-a-a-a-a-a-a-a-a any-a uppercase-a letters-a appear-a in-a the
-a-a-a-a-a-a-a-a-a-a-a-a-a search-a pattern;-a in-a other-a words, if a
-a-a-a-a-a-a-a-a-a-a-a-a-a pattern contains uppercase letters, then
-a-a-a-a-a-a-a-a-a-a-a-a-a that search does not ignore case.
-a-a-a-a-a-a -R or --RAW-CONTROL-CHARS
-a-a-a-a-a-a-a-a-a-a-a-a-a Like -r, but only-a ANSI-a "color"-a escape
-a-a-a-a-a-a-a-a-a-a-a-a-a sequences-a and OSC 8 hyperlink sequences
-a-a-a-a-a-a-a-a-a-a-a-a-a are output in "raw"-a form.-a-a Unlike-a -r,
-a-a-a-a-a-a-a-a-a-a-a-a-a the screen appearance is maintained cor-
-a-a-a-a-a-a-a-a-a-a-a-a-a rectly, provided that there are-a no-a es-
-a-a-a-a-a-a-a-a-a-a-a-a-a cape-a sequences-a in-a the file other than
-a-a-a-a-a-a-a-a-a-a-a-a-a these types of escape sequences.-a-a Color
-a-a-a-a-a-a-a-a-a-a-a-a-a escape sequences are only supported when
-a-a-a-a-a-a-a-a-a-a-a-a-a the color is changed-a within-a one-a line,
-a-a-a-a-a-a-a-a-a-a-a-a-a not-a across-a lines.-a In other words, the
-a-a-a-a-a-a-a-a-a-a-a-a-a beginning of each line is assumed to-a be
-a-a-a-a-a-a-a-a-a-a-a-a-a normal-a (non-colored), regardless of any
-a-a-a-a-a-a-a-a-a-a-a-a-a escape sequences in previous lines.-a For
-a-a-a-a-a-a-a-a-a-a-a-a-a the-a purpose-a of keeping track of screen
-a-a-a-a-a-a-a-a-a-a-a-a-a appearance, these escape-a sequences-a are
-a-a-a-a-a-a-a-a-a-a-a-a-a assumed to not move the cursor.
-a-a-a-a-a-a-a-a-a-a-a-a-a OSC-a 8-a hyperlinks-a are sequences of the
-a-a-a-a-a-a-a-a-a-a-a-a-a form:
-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a ESC ] 8 ; ... \7
-a-a-a-a-a-a-a-a-a-a-a-a-a The terminating sequence may be either a
-a-a-a-a-a-a-a-a-a-a-a-a-a BEL-a character (\7) or the two-character
-a-a-a-a-a-a-a-a-a-a-a-a-a sequence "ESC \".
-a-a-a-a-a-a-a-a-a-a-a-a-a ANSI-a color-a escape-a sequences-a are-a se-
-a-a-a-a-a-a-a-a-a-a-a-a-a quences of the form:
-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a ESC [ ... m
-a-a-a-a-a-a-a-a-a-a-a-a-a where-a the-a "..."-a is zero or more color
-a-a-a-a-a-a-a-a-a-a-a-a-a specification characters.-a You can-a make
-a-a-a-a-a-a-a-a-a-a-a-a-a less-a think-a that-a characters other than
-a-a-a-a-a-a-a-a-a-a-a-a-a "m" can end ANSI color escape-a sequences
-a-a-a-a-a-a-a-a-a-a-a-a-a by-a-a setting-a the-a environment-a variable
-a-a-a-a-a-a-a-a-a-a-a-a-a LESSANSIENDCHARS to the list of-a charac-
-a-a-a-a-a-a-a-a-a-a-a-a-a ters-a which-a can-a end a color escape se-
-a-a-a-a-a-a-a-a-a-a-a-a-a quence.-a And you-a can-a make-a less-a think
-a-a-a-a-a-a-a-a-a-a-a-a-a that-a characters other than the standard
-a-a-a-a-a-a-a-a-a-a-a-a-a ones may appear between the ESC and-a the
-a-a-a-a-a-a-a-a-a-a-a-a-a m-a by-a setting-a the environment variable
-a-a-a-a-a-a-a-a-a-a-a-a-a LESSANSIMIDCHARS to the list of-a charac-
-a-a-a-a-a-a-a-a-a-a-a-a-a ters which can appear.
-a-a-a-a-a-a -r or --raw-control-chars
-a-a-a-a-a-a-a-a-a-a-a-a-a Causes-a "raw"-a control-a characters to be
-a-a-a-a-a-a-a-a-a-a-a-a-a displayed.-a The default-a is-a to-a display
-a-a-a-a-a-a-a-a-a-a-a-a-a control characters using the caret nota-
-a-a-a-a-a-a-a-a-a-a-a-a-a tion; for example,-a a-a control-A-a (octal
-a-a-a-a-a-a-a-a-a-a-a-a-a 001) is displayed as "^A" (with some ex-
-a-a-a-a-a-a-a-a-a-a-a-a-a ceptions as described under the-a -U-a op-
-a-a-a-a-a-a-a-a-a-a-a-a-a tion).-a-a Warning:-a when the -r option is
-a-a-a-a-a-a-a-a-a-a-a-a-a used, less cannot keep track of the-a ac-
-a-a-a-a-a-a-a-a-a-a-a-a-a tual-a appearance-a of-a the-a screen (since
-a-a-a-a-a-a-a-a-a-a-a-a-a this depends on how the screen-a responds
-a-a-a-a-a-a-a-a-a-a-a-a-a to-a each-a type-a of-a control-a character).
-a-a-a-a-a-a-a-a-a-a-a-a-a Thus, various display problems-a may-a re-
-a-a-a-a-a-a-a-a-a-a-a-a-a sult,-a such as long lines being split in
-a-a-a-a-a-a-a-a-a-a-a-a-a the wrong place.
-a-a-a-a-a-a-a-a-a-a-a-a-a USE OF THE -r OPTION IS NOT RECOMMENDED.
Carlos E.R. wrote:
On 2025-02-11 09:44, R Daneel Olivaw wrote:
-aFrom the "man" page:
SUSE (and openSUSE) appear to be outliers here, here is a complaint from 2014: https://unix.stackexchange.com/questions/116395/less-searches-are- always-case-insensitive
https://linuxhandbook.com/search-less-command/-a-a-a and https://linuxopsys.com/less-command-cheat-sheet
are clearly using other distributions and they claim things work the way "man less" documents them.
You identified the
-a-a LESS='-M -I -R'
line and that is to be the problem.-a The other two options make perfect sense.
I edited .profile, specifying
-a-a-a export LESS="-M -R"
and that changed the behaviour (after a reboot).-a Thank you.
Carlos E.R. wrote:
On 2025-02-12 18:33, R Daneel Olivaw wrote:
Carlos E.R. wrote:
On 2025-02-11 09:44, R Daneel Olivaw wrote:
From the "man" page:
....
SUSE (and openSUSE) appear to be outliers here, here is a complaint from
2014: https://unix.stackexchange.com/questions/116395/less-searches-are-
always-case-insensitive
Why did he not ask on the openSUSE mail list? He would have found the
reason at least. I was there, too. Same as I found out how it was done I would have found 10 years ago.
https://linuxhandbook.com/search-less-command/ and
https://linuxopsys.com/less-command-cheat-sheet
are clearly using other distributions and they claim things work the way
"man less" documents them.
You identified the
LESS='-M -I -R'
line and that is to be the problem. The other two options make perfect
sense.
I edited .profile, specifying
export LESS="-M -R"
and that changed the behaviour (after a reboot). Thank you.
You can ask in the mail list and reach the people that did this (unless
they are no longer there or died or something). Or, directly create a bugzilla asking that the action be reversed.
--
Cheers, Carlos.
Carlos E.R. wrote:
On 2025-02-12 18:33, R Daneel Olivaw wrote:
Carlos E.R. wrote:
On 2025-02-11 09:44, R Daneel Olivaw wrote:
From the "man" page:
You can ask in the mail list and reach the people that did this (unless
they are no longer there or died or something). Or, directly create a
bugzilla asking that the action be reversed.
Where does one access the mail list?
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 63 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 492942:16:24 |
| Calls: | 840 |
| Files: | 1,300 |
| D/L today: |
5 files (1,241K bytes) |
| Messages: | 260,100 |