Path: utzoo!attcan!uunet!bria!mike Newsgroups: comp.arch Subject: Re: shell architecture (to glob or not to glob) Message-ID: <488@bria> Date: 28 Feb 91 01:49:01 GMT References: <378@bria> <19062@cbmvax.commo <5615@awdprime.UUCP> Reply-To: uunet!bria!mike Organization: MGI Group International, Los Angeles, CA Lines: 57 Followup-To: Keywords: In an article, skyler.arc.ab.ca!kenw (Ken Wallewein) writes: >> This seems to be a trivial and slightly amusing example of the problems >> of standardizing switch notation with a legal filename character. Anyone >> that understands the concepts of switch parsing would know that this has >> nothing to do with globbing. > > It has _everything_ to do with globbing. Certainly, if "-" wasn't a >valid filename character, the parser could use that as a parsing guide. >But even then, it shouldn't matter. Wait a second here. The dash is not part of globbing, per se (no cruft about the brackets, now. We all *know* that, don't we?) The shell globs filenames. Beyond that, it makes no decisions for the program. It does not re-order arguments, it does not qualify switches, etc. The way the program handles the dash has absolutely nothing to do with the shell; it has to do with getopt() and whether or not the program in question chooses to use it. Mixeth not apples with thine oranges. >> The current way of doing this in Unix is almost always intuitive and >> is close to infinitely flexible. A basic knowledge of simple quoting, >> globbing behavior, and switch parsing goes a long way. > > You are referring to the use of a './' prefix, I presume? I don't find >that intuitive. The existence of a hack workaround does not invalidate my >point. Ahem. "Hack workaround"? I am absolutely sick to death of every gripe that someone has with the shell and their innumerable references to "hacks". If you don't like the way the shell does it, then roll your own. In UNIX, you see, you're free to do that. People who groan about the complexity of UNIX, and all of the "hack workarounds" deserve DOS. Go play in that sandbox awhile. You'll come crawling back to UNIX soon enough. > Sure, one can apply escaping and quoting, etc. But programs which rely >on shell globbing generally can't handle such arguments anyway. > > Consider another case (what the heck, I'm brave :-) > > > mv cmp* compress* Please. Not *this* example *again*. Yawwwwwwwwn. Again, roll your own if you don't like it they way it is. > Don't get me wrong -- I'm not saying globbing is a bad idea. It's slick. Damn right it is. -- Michael Stefanik, MGI Inc., Los Angeles| Opinions stated are not even my own. Title of the week: Systems Engineer | UUCP: ...!uunet!bria!mike ------------------------------------------------------------------------------- Remember folks: If you can't flame MS-DOS, then what _can_ you flame?