Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!ames!oliveb!amiga!cbmvax!daveh From: daveh@cbmvax.UUCP (Dave Haynie) Newsgroups: comp.sys.amiga Subject: Re: AmigaDos vs Unix wildcards/pathnames Message-ID: <6254@cbmvax.UUCP> Date: 14 Mar 89 18:15:42 GMT References: <10260015@eecs.nwu.edu> Organization: Commodore Technology, West Chester, PA Lines: 46 in article <10260015@eecs.nwu.edu>, gore@eecs.nwu.edu (Jacob Gore) says: > / comp.sys.amiga / daveh@cbmvax.UUCP (Dave Haynie) / Mar 13, 1989 / >>And how would you succinctly state: >> Delete #?(.cp|.h|%) >>in UNIX-ese? > rm *{.cp,.h,%} In AmigaDOS, "%" matches the NULL character. Which, of course, made the above example reduce to "Delete #?", which wasn't what I had intended. I figured you could do it in UNIX pretty closely, which is exactly my point. Try it in VMS or MS-DOS.... >> > 1> copy (*.c|*.h) t: (what's wrong with `cp *.c *.h t:' ??) >> That's a detail of the AmigaDOS copy program, not the wild card system. > Interesting that you should mention that. In Unix, it would be a detail of > the shell, not the program. Not really. In UNIX, _pattern matching_ is done by the shell, true. But it is still up to a program to decide how the expanded parameters passed by the shell will be interpreted. Some Amiga shells also expand patterns for the command, but if that commands isn't written to handle more than one file, you're SOL. UNIX "cp" must have to knowledge to copy files argv[1] through argv[argc-2] to directory argv[argc-1]. AmigaDOS "Copy" doesn't do this, and that's the main difference here. > Unix commands do not have consistent option specifications, but they ARE > consistent, as the user sees them, when it comes to wildcards. This, of > course, is because most of them don't deal with wildcards at all, because > they know the shell is there to do it for them. That part is true. As long as wild card expansion is available as a standard library call, it's not much matter who does the expansion; there are minor advantages to both methods, and you can always choose the shell that suits you. On the Amiga, it makes as much sense to have consistent pattern matching in file requesters and other similar places. We need this function as a standard library call. > Jacob Gore Gore@EECS.NWU.Edu > Northwestern Univ., EECS Dept. {oddjob,gargoyle,att}!nucsrl!gore -- Dave Haynie "The 32 Bit Guy" Commodore-Amiga "The Crew That Never Rests" {uunet|pyramid|rutgers}!cbmvax!daveh PLINK: D-DAVE H BIX: hazy Amiga -- It's not just a job, it's an obsession