help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Man page on conditional expressions: =~ missing?


From: Francois Tonneau
Subject: Man page on conditional expressions: =~ missing?
Date: Thu, 27 Aug 2020 11:02:23 -0300

Hello,

I have a comment/suggestion/question about the man page of GNU bash
5.0.16(1) on Debian.

The section on:

Compound Commands
[[ expression ]], where expression is a conditional expression

mentions correctly that "an additional binary operator, =~, is available
..."

Yet later, in the section on:

CONDITIONAL EXPRESSIONS,
where "expressions are formed from the following unary or binary primaries"
..., I could not see any mention of =~ (whereas == and != are mentioned).

For the sake of completeness, shouldn't the =~ operator mentioned in the
later list?  A conditional expression with the regex operator does seem to
work in current bash (for example,  [[ foo =~ ^foo$ && bar == bar ]] &&
echo ok).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]