Path: utzoo!attcan!uunet!samsung!sol.ctr.columbia.edu!cica!iuvax!rutgers!cbmvax!daveh From: daveh@cbmvax.commodore.com (Dave Haynie) Newsgroups: comp.sys.amiga.tech Subject: Re: Wildcards Message-ID: <10210@cbmvax.commodore.com> Date: 16 Mar 90 15:26:33 GMT References: <102618@linus.UUCP> Reply-To: daveh@cbmvax (Dave Haynie) Organization: Commodore, West Chester, PA Lines: 55 In article <102618@linus.UUCP> duncant@mbunix.mitre.org (Thomson) writes: >In article peter@sugar.hackercorp.com (Peter da Silva) writes: >>Scripts would probably run with quotewild on by default, and the more powerful >>amiga-style wildcards, and interactive shells would turn quotewild off and use >>the terser unix-style wildcards. >|I am surprised at the use of the phrase "more powerful amiga-style wildcards". >More powerful than what? Everything you can do with # and ? you can doo >with * and ?, not jsut on unix, but also on VMS and (to some extent) on DOS. Really? I think you should read up on AmigaDOS wildcards (and probably UNIX too). Using just * and ?, please construct a single pattern that meets these requirements: MATCH DON'T MATCH Foo.Bar Fxx.Bxr Foo.Baar Fx.Bxxxr Fo.Baaar The answer, in AmigaDOS-speak, using only the # and ? metacharacters (which is an absurd example, since most interesting cases, rather than this carefully constructed on, often use at the (, ), and | metacharacters): F#o.B#ar You can make a pattern that'll match that in UNIX, but not with your restricted set of * and ? only. >I never understood where the AmigaDos wildcard conventions came from. Well, TriPos, basically. But the logic behind it is that, rather than simple wildcards, you have a reasonable regular expression language. The "*" convention would be a waste of a metacharacter. The one that's missing (but hopefully in 1.4) is a negation character. >Why deviate from a widely used convention in favor of a new one which >noone is familiar with? Only the degenerate case of *? is widely used, and even then, the actual meaning varies between systems. If you don't believe that, try just * under Apollo's DomainOS/Aegis sometime. The obvious answer to your question, of course, is the standard one: new conventions are adpoted because they are considered better. That's why I traded my C128 for an Amiga in the first place, why I program in C or C++ most of the time rather than BASIC, why I find a GUI occasionally useful even though it's not as "widely used" as a command-line interface. Etc. >Duncan Thomson -- Dave Haynie Commodore-Amiga (Systems Engineering) "The Crew That Never Rests" {uunet|pyramid|rutgers}!cbmvax!daveh PLINK: hazy BIX: hazy Too much of everything is just enough