Annihilannic via Cygwin writes:
> On 04/07/2026 21:55, Hans-Bernhard Bröker via Cygwin wrote:
>> Because it's not --- not undocumented, that is. Manpage search can't
>> seem to find it, but it _is_ there.
>>
>> Just search for '==' instead, then go one paragraph down.
>
> I suspected the same and did exactly that, but I must be in a different
> parallel universe to you ;-)
No, you are just not following the instructions. The paragraph you'll
find is this (quotest with the paragraphs above an below for clarity):
--8<---------------cut here---------------start------------->8---
[[ expression ]]
Return a status of 0 or 1 depending on the evaluation of the
conditional expression expression. Expressions are composed
of the primaries described below under CONDI‐ TIONAL
EXPRESSIONS. The words between the [[ and ]] do not undergo
word splitting and pathname expansion. The shell performs
tilde expansion, parameter and variable expansion,
arithmetic expansion, command substitution, process
substitution, and quote removal on those words (the
expansions that would occur if the words were enclosed in
double quotes). Conditional operators such as -f must be
unquoted to be recognized as primaries.
When used with [[, the < and > operators sort
lexicographically using the current locale.
When the == and != operators are used, the string to the
^^ search from the top of the manpage first matches here
right of the operator is considered a pattern and matched
according to the rules described below under Pattern
Matching, as if the extglob shell option were enabled. The
= operator is equivalent to ==. If the nocasematch shell
option is enabled, the match is performed without regard to
the case of alphabetic characters. The return value is 0 if
the string matches (==) or does not match (!=) the pattern,
and 1 otherwise. Any part of the pat‐ tern may be quoted to
force the quoted portion to be matched as a string.
An additional binary operator, =˜, is available, with the
same precedence as == and !=. When it is used, the string
to the right of the operator is considered a POSIX extended
regular expression and matched accordingly (using the POSIX
regcomp and regexec interfaces usually described in
regex(3)). The return value is 0 if the string matches the
pattern, and 1 otherwise. If the regular expression is
syntactically incorrect, the conditional expression’s return
value is 2. If the nocasematch shell option is enabled, the
match is performed without regard to the case of alphabetic
characters. If any part of the pattern is quoted, the
quoted portion is matched lit‐ erally. This means every
character in the quoted portion matches itself, instead of
having any special pattern matching meaning. If the pattern
is stored in a shell variable, quoting the variable
expansion forces the entire pattern to be matched literally.
Treat bracket expressions in regular expressions carefully,
since normal quoting and pattern characters lose their
meanings between brackets.
--8<---------------cut here---------------end--------------->8---
THe reason you can't find "=~" is that the in the manpage this is
actually rendered as "=˜", probably because of some interaction with
groff formatting or a character substitution within groff.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple