Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Apr 2020 15:36:20 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 246000] grep range bracket expression bug
Message-ID:  <bug-246000-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D246000

            Bug ID: 246000
           Summary: grep range bracket expression bug
           Product: Base System
           Version: 12.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: spy@spy.zp.ua

I was looking for files with uppercase letters in names using `ls | grep
"[A-Z]"` and got all lowercase files present in result.=20
Then I tested grep, and seems I hit a bug, even more strange than I expecte=
d.=20

Here is a simple way to reproduce:

# cat > 1111
a
b
c
d
A
B
C
D

# grep "[a-c]" 1111
a
b
c
A
B

# grep "[A-C]" 1111
b
c
A
B
C

# locale
LANG=3Den_US.UTF-8
LC_CTYPE=3D"en_US.UTF-8"
LC_COLLATE=3D"en_US.UTF-8"
LC_TIME=3D"en_US.UTF-8"
LC_NUMERIC=3D"en_US.UTF-8"
LC_MONETARY=3D"en_US.UTF-8"
LC_MESSAGES=3D"en_US.UTF-8"
LC_ALL=3D

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-246000-227>