Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!sugar!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.os.misc Subject: Re: Globbing Message-ID: Date: 7 Mar 91 16:48:48 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) Distribution: na Organization: Xenix Support, FICC Lines: 42 In article kenw@skyler.arc.ab.ca (Ken Wallewein) writes: > Peter, you asked me to come up with other examples besides the mv/rename > one. [...] It wasn't easy; they don't exist now, as far as I know -- maybe > due to a chicken-and-egg precedence problem Look for examples on VMS, DOS, AmigaDOS, etc. No catch-22 there. > -- but here are a couple: > difff [args] spec1 [args] spec2 [moreargs (why not?)] Amazing. A second case. I'm not sure I'd want to do this, just out of concern for the possibility of unmatched files in spec1 or extra files in spec2. It'd be possible to get the equivalent functionality even without a more complex command line, but you said you don't want to consider that. Fair enough. > Another example might be one wherein one set of files is used to process > another set of files -- a glorified 'make' or 'xch', perhaps. Now you're really pushing it. I think this, if anything, illustrates that this particular case (two corresponding lists of file names) is a pretty damn rare one, and shell globbing *can* deal with it... with a slightly different syntax. Not within your rules for this contest, but a reasonable solution. > What if globbing were turned off by default, and one escaped or quoted > an argument to make it glob? I have the impression that that has been > tried and abandoned. Does anyone know why? The default action you want is to glob. For a current shell that does this, try "tcl". > But maybe it's pointless to debate the niceties of a command line > interface, when it may soon be that only software and programmers will use > them, and everyone else will use GUIs. I don't know. As soon as a command line oriented scripting language showed up on the Mac it took the Mac world by storm. Here I'm talking about Hypercard... -- Peter da Silva. `-_-' peter@ferranti.com +1 713 274 5180. 'U` "Have you hugged your wolf today?"