Path: utzoo!utgpu!water!watmath!clyde!rutgers!cmcl2!husc6!tut.cis.ohio-state.edu!mailrus!umix!uunet!mcvax!enea!sommar From: sommar@enea.se (Erland Sommarskog) Newsgroups: comp.os.vms Subject: Re: Help us defend against VMS! Keywords: Wild cards Message-ID: <2918@enea.se> Date: 26 Mar 88 17:23:28 GMT References: <1782@pasteur.Berkeley.Edu> Reply-To: sommar@enea.UUCP(Erland Sommarskog) Followup-To: comp.os.vms Organization: ENEA DATA AB, Sweden Lines: 47 Off we go again. Some quibblings about wild cards this time. And if you feel you had enough of this already, well the form feed it's for you. >A more annoying <...> is DCL's silly treatment of *. Leaves >interpretation of the damn thing up to the command. So some do, some >don't. And the ones you want 'em to, don't. E.g., the infamous SET DEF: >... >Well, so, there's this lib$find_file or similar routine that your program >can use, that will parse filenames iteratively, giving you back one per >call. And your users have stood outside your office with cut-down First we discussed command parsing. DCL parses the command and inkoves the image. In Unix the program has to parse them itself, giving a non- uniform interface. With wild cards it's the opposite. The shell expands them, whereas DCL leaves that to the program and the file system. The good way with the Unix style is that it's easy to write a utility that operates on a suite of files. Just read argv to the end. This is harder under VMS. LIB$Find_file (or $parse and $search) are more difficult for the unexperiencd user. The VMS way has two advanteges. Unix assumes that all arguments are files. This is often, but not always true. "HELP *" does also give a better result than "man *". The other point is that you use file specification in more places than the command line interpreter. Instead of putting the file- name parsing in DCL, VMS provides routines (in RMS) for a uniform behaviour. Not only wild cards, but also logical names, related names and defaults. But of course, the programs must actually use them, for it all to work. I assume Unix has *something* similar to this - it ought to have - but ~-substitution does not always work, as translation of environment variables. (Which is the closest to logical names Unix comes as far as I know.) And for postorder/preorder of DELETE: DELETE uses the same routines as all the other commands, in which we would prefer preorder. No problem for "rm" to make it right. It has to do the traversal itself anyway. Unix doesn't provide a wild card like "...". At least no one has told me about it. -- Erland Sommarskog ENEA Data, Stockholm sommar@enea.UUCP