Regular Expression Case Sensitivity

Rusty Carruth plug-discuss@lists.PLUG.phoenix.az.us
Tue, 4 Dec 2001 23:53:08 -0700 (MST)


> 
> On Tue, Dec 04, 2001 at 11:54:44AM -0800, Simper, Brian D wrote:
> > Try this in an empty directory and let me know if this is a bug or a feature
> > or an error on my part.
> > 
> > Create several files of upper and lower case names:
> > ...
> > Now use a regular expression to delete all files starting with a lower case
> > letter:
> > 
> > 	rm [a-z]*
> > 
> > When I was experimenting with this all of the files starting with *any*
> > alphabetic character were deleted.  

I just tried it, Mandrake 7.0.2 - it worked as expected for me
(the Uppercase files stuck around ;-).

> > ...
> 
> You don't have the nocaseglob bash shell option set do you?  What does
> "shopt | grep nocaseglob" say?

Also, check what filesystem you're doing this on. Some filesystems
do some strange things to upper/lower stuff...