Bug 36857
Summary: | Broken ordering when running grep -l with bash | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Thierry Valentin <valentin> |
Component: | bash | Assignee: | Bernhard Rosenkraenzer <bero> |
Status: | CLOSED NOTABUG | QA Contact: | David Lawrence <dkl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2001-04-20 16:45:32 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Thierry Valentin
2001-04-20 16:45:26 UTC
This is a feature, not a bug. bash 2.x is locale aware, and sorts according to the locale, not according to what C thinks, therefore a1 can come before a. (*.cc is expanded by bash, put in the right order according to your locale, then passed to grep, which preserves the order dictated by bash). If you don't like this, export LC_COLLATE=C or grep -l hello `ls -1 *.cc` The latter may change to do just what you're seeing now in a later version of fileutils. export LC_COLLATE=c makes things work as expected. Thanks a lot for your help |