Xref: utzoo comp.arch:21175 comp.os.misc:1610 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!sugar!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.arch,comp.os.misc Subject: Re: Globbing Message-ID: Date: 28 Feb 91 21:05:28 GMT References: <1991Feb18.152347.28521@dgbt.doc.ca> <474@bria> <19217@cbmvax.commodore.com> <5573:Feb2307:19:4491@kramden.acf.nyu.edu> <19336@cbmvax.commodore.com> <43994@cos.com> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Followup-To: comp.os.misc Distribution: na Organization: Xenix Support, FICC Lines: 37 In article <43994@cos.com> fetter@cos.UUCP (Bob Fetter) writes: > Ok, so what is this? Well, if the shell does globbing, ok, fine. > If somebody decides to code > execl("my_copy","my_copy","*.c","dest_dir/",NULL); > then why not have 'my_copy' understand globbing? What happens when "*.c" is the actual file name under consideration? The biggest advantage to shell globbing for me is that I *know* that each argument I pass in argv is damn well going to stay one argument once it gets to the program I'm calling. > Were software to be written in this manner, wouldn't this make the > entire debate happening here moot? Those folks who advocate having > executables handle globbing are free (like the folks who wrote find) > to put it in. And the folks who expect programs to take arguments as they're handed, damnit, will lose out. As we do on every operating system other than UNIX. I've written this sort of code for MS-DOS, VAX/VMS, and AmigaDOS, and I really really hate having to special-case all the quoting. Oh sure, it's easy enough to get right in a script, but when my program is going to be handed an arbitrary program name, and a list of file names... Nope. Making programs glob command line arguments is like having them handle erase and kill processing, or serial port interrupts, or display refresh, or expose events. Come on, UNIX started a revolution by making it easier for application writers to get these sort of details right. Let's not make huge steps back into the days when everyone did it themselves and most of them got it wrong! -- Peter da Silva. `-_-' peter@ferranti.com +1 713 274 5180. 'U` "Have you hugged your wolf today?"