[Top][All Lists]

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

Equivalence class in shell pattern does not work

From: Lukáš Bařinka
Subject: Equivalence class in shell pattern does not work
Date: Sun, 24 Feb 2019 16:01:38 +0100

Configuration Information:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/bash-Kt4GMb/bash-5.0=.
-fstack-protector-strong -Wformat -Werror=format-security -Wall
-Wno-parentheses -Wno-format-security
uname output: Linux barinkl 4.19.0-1-amd64 #1 SMP Debian 4.19.12-1
(2018-12-22) x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

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

Equivalence class in shell patterns does not work as expected. On the other
hand, equivalence class does work in regular expressions in bash.

The problem is in shell patterns inside Extended test [[ ]], globbing and
the case compound command.


#It does not work in SP
[[ éáö = *[[=e=][=a=][=o=]]* ]]; echo $?
[[ éáö == *[[=e=][=a=][=o=]]* ]]; echo $?

touch é á ö; echo [[=e=][=a=][=o=]]

case éáö in *[[=e=][=a=][=o=]]*) echo ok;; esac

#It works in RE as expected:
[[ éáö =~ [[=e=][=a=][=o=]] ]]; echo $?

reply via email to

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