Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cbmvax!daveh From: daveh@cbmvax.commodore.com (Dave Haynie) Newsgroups: comp.arch Subject: Re: Globbing Message-ID: <19217@cbmvax.commodore.com> Date: 22 Feb 91 03:15:00 GMT References: <1991Feb18.152347.28521@dgbt.doc.ca> <474@bria> Reply-To: daveh@cbmvax.commodore.com (Dave Haynie) Distribution: na Organization: Commodore, West Chester, PA Lines: 38 In article <474@bria> uunet!bria!mike writes: >In an article, dgbt.doc.ca!don (Donald McLachlan) writes: >|1 remove globbing from the shell. >|2 put in a library. >|3 current shell programs would need to be updated (first thing they do >| is call glob(argc, argv), returning argc and argv updated (globbed) >|4 New programs that want to glob can call glob. >This has been discussed before, but briefly put, it would complicate code >needlessly, Well, it certainly can complicate code a little. You might have to build a doubly nested loop, rather then the single "for (int i = 0; argc--;..." thing. >and create even more of a maze of command syntax for the average user. Unless all possible commands fit into the command [flags] arg1..argN globbed_filesystem_arg model, you're pretty much in trouble if you only have shell globbing. And anything that doesn't fit that model becomes needless, inconsistent complication to the average user. After all, the average user doesn't know how the program gets written, and has no reason to expect that shell escapes are necessary when feeding a command a pattern for a string search, but not necessary when feeding a command a pattern for a file search. Program driven globbing doesn't force inconsistency, and certainly shell globbing doesn't force consistency, as UNIX is more than happy to prove to anyone using it. >Michael Stefanik, MGI Inc., Los Angeles| Opinions stated are not even my own. -- Dave Haynie Commodore-Amiga (Amiga 3000) "The Crew That Never Rests" {uunet|pyramid|rutgers}!cbmvax!daveh PLINK: hazy BIX: hazy "What works for me might work for you" -Jimmy Buffett Brought to you by Super Global Mega Corp .com