Bug 118443
Summary: | In a script, bash erroneously includes files that start with an uppercase letter in the glob [a-z]* | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 2.1 | Reporter: | John Caruso <jcaruso> |
Component: | bash | Assignee: | Pete Graner <pgraner> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 2.1 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | 5.0 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2007-08-18 07:39:01 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
John Caruso
2004-03-16 19:35:14 UTC
Ok, I know what's coming (after doing another bug search that was more fruitful). The question then becomes: why does RHAS 2.1 use a default setting for LANG (en_US, in this case) that produces such badly broken bash behavior? And, which is the correct (or preferred) fix: setting LANG=C, setting LC_COLLATE=C, or both? And what are the downsides? If RHAS 2.1 sets those defaults (which we haven't touched since the installation), surely there must be some good reason for it, considering the extreme damage that can result from having file globs behave in this manner. Reassigning to distribution, since this is not to do with bash. And, why does the behavior differ between an interactive bash shell and a bash script? I checked the environment in each instance, and in both cases LANG was set to en_US; in fact the only difference between the environment for the interactive bash shell and the script was the SHLVL variable. Surely the behavior should at least be consistent if the environment variables are the same? Is there any reason why [A-Z] or [a-z] are dependent on the LANG setting? The LANG setting is useful in some aspects. However, if the regular expressions are broken afterwards,... BTW. [A-Z] also includes the lower case letters. Bugzilla clean up. Closing. RHEL 2.1 is in maint mode. Fixed in later versions of RHEL. |