Home | FAQ | Server | Presentations | Mailing Lists/Archives | Member Tools | Links | Sponsors | ContactThe reason "echo *" does what it does is because the shell expands the wild card, and echo displays it. lt has nothing to do with the wild card expressions you put in the parameter list. If you don't want the shell to expand the wild card, you have to quote it. When you use quotes, it passes the quoted string directly to the program instead of the shell parsing it. If you do that, you will get a completely different result. Problem is, it's shell dependant. I like bash because I have become used to it. I used to use csh, but I can't stand it now because of how it works. Thing is, the idea behind Unix is that you have small specialized programs and library functions. You string them together using programs or scripts to acomplish larger tasks The ls and grep combination is exactly how it's supposed to be. If you use it alot, you script them together or make shell aliases. I've never thought of doing a case insensitive ls, so the added code to perform that single seldom used function would remain unused in most cases where I was concerned. Add lots of other seldom used but requested functions and you have..... Windows! :-) Shannon ________________________________ From: EMAIL:PROTECTED on behalf of Mike Miller Sent: Thu 10/21/2004 5:24 PM To: MLUG Members Subject: RE: [MLUG] ls features On Thu, 21 Oct 2004, Spurling, Shannon wrote: > Okay, I confirmed that it is a shell option by asking a very > knowledgeable co-worker. He looked it up and you can use the following > command to disable case for wild card expansion in BASH: > > shopt -s nocaseglob Yep, it works! That must mean that it is possible to write a bash script that will do case-insensitive ls commands. Don't you think? > Also, as an example of what ls * is actually doing, do the following.... > > echo * > > Interesting.... :-) I agree. I had no idea that's what would happen until you brought it up. > ls is not for finding files, it's for listing the contents of the > current directory. Or other directories, or recursively up the tree. Mike _______________________________________________ members mailing list EMAIL:PROTECTED http://mlug.missouri.edu/mailman/listinfo/members
<<winmail.dat>>
_______________________________________________ members mailing list EMAIL:PROTECTED http://mlug.missouri.edu/mailman/listinfo/members