Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15380 > unrolled thread

Incorrect example for `[[` command.

Started byhk <hkadeveloper@gmail.com>
First post2019-09-20 13:40 +0800
Last post2019-09-20 13:40 +0800
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Incorrect example for `[[` command. hk <hkadeveloper@gmail.com> - 2019-09-20 13:40 +0800

#15380 — Incorrect example for `[[` command.

Fromhk <hkadeveloper@gmail.com>
Date2019-09-20 13:40 +0800
SubjectIncorrect example for `[[` command.
Message-ID<mailman.590.1568982278.2190.bug-bash@gnu.org>
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2 -Wno-parentheses -Wno-format-security
uname output: Linux hk 4.15.0-62-generic #69-Ubuntu SMP Wed Sep 4 20:55:53
UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 5.0
Patch Level: 0
Release Status: release

Description:
        On section 3.2.4.2 of Bash Reference Manual, the example on*
[[...]]* (page 13 in the PDF) is incorrect. Specifically, the example say *[[
$line =~ [[:space:]]*?(a)b ]]*  will match values like *'aab'* and*
'aaaaaab*'. But it won't. The operator is* =~*, but the operand on the
right side is a pattern while it should be a regular expression.

Repeat-By:
        [Describe the sequence of events that causes the problem
        to occur.]

Fix:
        [Description of how to fix the problem.  If you don't know a
        fix for the problem, don't include this section.]

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web