bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subshells and shellscripts do not always expand [a-z] to


From: Chet Ramey
Subject: Re: Subshells and shellscripts do not always expand [a-z] to
Date: Tue, 3 Dec 2002 11:09:12 -0500

> echo .[a-z]*
> 
> under bash 1.14.7(1), the version distributed with RH 7.2, all
> combinations of simple invocations of dote2, dote3, . dote2, . dote3,
> 'echo .[a-z]*' from the shell prompt, and 'bash -c 'echo .[a-z]*' '
> from the shell prompt return the correct answer--all the
> lower-case dotfiles. (assuming you sit in $HOME)
> 
> 
> under bash 2.05a.0(1), the version distributed with RH 7.3, dote3, .
> dote3, . dote2, and `echo .[a-z]*` from the shell prompt all return the
> correct answer, but the invocation of dote2 from the command line or the
> statement 'bash -c 'echo .[a-z]*' ' from the command line returns ALL
> dotfiles of BOTH cases. Which is very curious, because

Read the Bash FAQ, question E9 and item 13 in the NOTES file in the bash
distribution.

The likely cause is that one of your startup files that, for instance, is
not read by bash when invoked with the `-c' option, sets the locale.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )

Chet Ramey, ITS, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]