On Fri, 2003-12-12 at 09:53, Jacob Fugal wrote:
> [EMAIL PROTECTED] wrote:
> | In my Linux class last night we were doing a review my typed in ls -m
> | [-d-p]* which returned the file Dog. Can anyone explain how this works?
> | The -m I understand places commas between the file names. I was under
> | the impression that [-d-p] would return any character between d and p
> | and that this statement is case sensitive. The * means that can be any
> | number of those characters. If could explain this as to why it returns
> | Dog I would be grateful, because my teacher doesn't have a clue why it
> | does that. Thanks.
> 
> So ls -m [-d-p]* will match any filename beginning with '-' or a
> character between 'd' and 'p' (case sensitive).
> 
> The interesting thing is, it still shouldn't match against Dog (for me
> it doesn't).
> 
> bash-2.05b$ ls
> Dog  dog
> bash-2.05b$ ls -m [-d-p]*
> dog

On FC1, ext3:

[EMAIL PROTECTED] tmp]$ ls -m [-d-p]*
dog, Dog

On Debian testing, ext3:

[EMAIL PROTECTED]:~/tmp$ ls -m [-d-p]*
dog

So, yeah, that's weird.


____________________
BYU Unix Users Group 
http://uug.byu.edu/ 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to