Bug 49003 - ] character cannot be used in a character list regexp
Summary: ] character cannot be used in a character list regexp
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: grep (Show other bugs)
(Show other bugs)
Version: 7.1
Hardware: i686 Linux
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: Aaron Brown
Depends On:
TreeView+ depends on / blocked
Reported: 2001-07-12 22:53 UTC by Vijay Seshadri
Modified: 2007-04-18 16:34 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-07-12 22:53:05 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Vijay Seshadri 2001-07-12 22:53:01 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.2-2 i686)

Description of problem:
Problem Explanation: The Character ']' cannot be used inside a character
list. The GNU documentation says that to use this in  a character list, put
it in the beginning of the list. The same is the observation for '^'
character.(which the doc says should in anywhere but first)
BTW, the same command works fine in solaris.

How reproducible:

Steps to Reproduce:
1. grep -E '[]a]' <file> where file contains a ] charater somewhere
2. Also, please make sure the line that contains the char ] does *not*
contain 'a'.

Actual Results:  Does not print the line containing the ]

Expected Results:  It should print the line containing a ]

Additional info:

grep version number 2.4.2

Comment 1 Bernhard Rosenkraenzer 2001-07-17 10:15:40 UTC
Fixed in 2.4.2-7

Note You need to log in before you can comment on or make changes to this bug.