Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 590002 - grep changed behavior for interval patterns
grep changed behavior for interval patterns
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: grep (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Jaroslav Škarvada
BaseOS QE - Apps
Depends On:
Blocks: 594571 596249
  Show dependency treegraph
Reported: 2010-05-07 09:39 EDT by Ondrej Hudlicky
Modified: 2010-06-17 05:17 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 594571 596249 (view as bug list)
Last Closed: 2010-06-17 05:17:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ondrej Hudlicky 2010-05-07 09:39:23 EDT
Description of problem:

$ echo $LANG
$ echo -e "HELLO\nworld" | grep '[a-z]'
$ LC_COLLATE=C echo -e "HELLO\nworld" | grep '[a-z]'

Character intervals are dependent on collates (LC_COLLATE). Default - locale UTF based collate - is excellent for sorts but not so friendly to interval searches: aAbBcC...yYzZ.
Old grep behaviour was wrong, on the other hand new POSIX based behaviour can bring troubles - break old scripts. More customers and also internal tools could be affected.

Recommended solution: 
Document in RHEL6 release notes
1. to preserve old behavior: export LC_COLLATE=C
2. correct way to grep lower/upper case is to use patterns [:lower:],[:upper:]..

Version-Release number of selected component (if applicable):

How reproducible:

Additional info:
Fedora thread
Related bugs: 
Comment 1 RHEL Product and Program Management 2010-05-07 10:07:50 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
Comment 3 Radek Vokal 2010-06-17 05:00:20 EDT
There's no code change needed, all we need is proper documentation. The bug for Migration guide is bug #594571 .
Comment 4 RHEL Product and Program Management 2010-06-17 05:17:30 EDT
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.

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