| delorie.com/archives/browse.cgi | search |
| DMARC-Filter: | OpenDMARC Filter v1.4.2 delorie.com 665Ekqw22386946 |
| Authentication-Results: | delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com |
| Authentication-Results: | delorie.com; spf=pass smtp.mailfrom=cygwin.com |
| DKIM-Filter: | OpenDKIM Filter v2.11.0 delorie.com 665Ekqw22386946 |
| Authentication-Results: | delorie.com; |
| dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=CRMawBBv | |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org D2CF44BA2E19 |
| DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; |
| s=default; t=1783262810; | |
| bh=O1fimBdSdggfK72q8/SVV2JO7YUHA5riJuBk5P34Q9s=; | |
| h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: | |
| List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: | |
| From; | |
| b=CRMawBBvwviOKC1jvTC38l0nHV9OLbR2rKsqSwII+MmslIysQ0kUm3CjlFdB0ZqOH | |
| nPpuSgoz6R4XmVvrh9sp52DbpKAK9ffcWkJn9FSTaJj/E7YlFpStSa7GW7M5QsrmXx | |
| FU9kPu+ESM9O0dYGmODMykFDfyDqsG71xRRPNKO8= | |
| X-Original-To: | cygwin AT cygwin DOT com |
| Delivered-To: | cygwin AT cygwin DOT com |
| DMARC-Filter: | OpenDMARC Filter v1.4.2 sourceware.org 005F14BA2E22 |
| ARC-Filter: | OpenARC Filter v1.0.0 sourceware.org 005F14BA2E22 |
| ARC-Seal: | i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783262774; cv=none; |
| b=M4VJowxWQeeNnMyfdJxgo+fiUEBQeiGayM9qwRVCixWjpAbbt4vR3rbXdK3Wcg/hq1kSImCNcBfCvSrx5W2WuSX0kHyuJCUNAe5njFL0yOgOqu2m273xCj7xPf2to8/UWiiwkj2extpZs3pY5jVsiIigg0u+FCTHjIbO4l6wn9c= | |
| ARC-Message-Signature: | i=1; a=rsa-sha256; d=sourceware.org; s=key; |
| t=1783262774; c=relaxed/simple; | |
| bh=H+F07MzEdciS6zliMWBI80rcUxFkehL+kwcfawRslJo=; | |
| h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; | |
| b=MyiNmaglRb++qATwbFxCquXDg+MkJtPfz+C2SXDdOF7OxlyelxBmJx1z0jpxuoZS8xfYIIkSeSBd1Pbecmqskf0+8ExpxHeIOHub2TbHXMgZ8GcKAfCmEt6uYtu4Lv6DuuiZLvtt+H2d0qo3xoNMhfN0/thzMxqLL3M5zdig7vU= | |
| ARC-Authentication-Results: | i=1; sourceware.org; |
| dkim=pass (1024-bit key, secure) header.d=nexgo.de | |
| header.i=@nexgo.de header.a=rsa-sha256 header.s=vfde-mb-mr2-23sep | |
| header.b=F1lVyeHa | |
| DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org 005F14BA2E22 |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: Issue with Bash RegEx Handling |
| In-Reply-To: | <TYWPR01MB8789605364924B9B1015833FC1F22@TYWPR01MB8789.jpnprd01.prod.outlook.com> |
| (Annihilannic via Cygwin's message of "Sun, 5 Jul 2026 20:38:30 | |
| +1000") | |
| References: | <CAAHpriNWXBUa8JCsRvbiXxWr6VOsHYfmC2-wuyfQQe+M8DJ-TQ AT mail DOT gmail DOT com> |
| <TYWPR01MB8789F04EAA5B85D830F970EFC1F32 AT TYWPR01MB8789 DOT jpnprd01 DOT prod DOT outlook DOT com> | |
| <6b9204a2-adc2-49af-bb2e-f8c1a2174c12 AT gmail DOT com> | |
| <TYWPR01MB8789605364924B9B1015833FC1F22 AT TYWPR01MB8789 DOT jpnprd01 DOT prod DOT outlook DOT com> | |
| Date: | Sun, 05 Jul 2026 16:45:55 +0200 |
| Message-ID: | <87bjcltrz0.fsf@Gerda.invalid> |
| User-Agent: | Gnus/5.13 (Gnus v5.13) |
| MIME-Version: | 1.0 |
| X-purgate-server: | smtpa01 |
| X-purgate-type: | clean |
| X-purgate: | clean |
| X-purgate-size: | 4193 |
| X-BeenThere: | cygwin AT cygwin DOT com |
| X-Mailman-Version: | 2.1.30 |
| List-Id: | General Cygwin discussions and problem reports <cygwin.cygwin.com> |
| List-Unsubscribe: | <https://cygwin.com/mailman/options/cygwin>, |
| <mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe> | |
| List-Archive: | <https://cygwin.com/pipermail/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-request AT cygwin DOT com?subject=help> |
| List-Subscribe: | <https://cygwin.com/mailman/listinfo/cygwin>, |
| <mailto:cygwin-request AT cygwin DOT com?subject=subscribe> | |
| From: | ASSI via Cygwin <cygwin AT cygwin DOT com> |
| Reply-To: | ASSI <Stromeko AT nexgo DOT de> |
| Errors-To: | cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com |
| Sender: | "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com> |
| X-MIME-Autoconverted: | from base64 to 8bit by delorie.com id 665Ekqw22386946 |
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
| webmaster | delorie software privacy |
| Copyright © 2026 by DJ Delorie | Updated Dec 4 2026 |