Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!uplherc!wicat!meph!gsarff From: gsarff@meph.UUCP (Gary Sarff) Newsgroups: comp.arch Subject: Re: UNIX mind-set -> OK, OK! Message-ID: <00054@meph.UUCP> Date: 18 Jan 91 01:28:42 GMT References: <1991Jan13.113349.21937@ims.alaska.edu> <11305@lanl.gov> <1991Jan14.013815.11419@ims.alaska.edu> <11314@lanl.gov> <1991Jan14.203207.20436@zoo.toronto.edu> Reply-To: gsarff@meph.UUCP Organization: WICAT Systems Inc., Orem Utah Lines: 39 In article <1991Jan14.203207.20436@zoo.toronto.edu>, henry@zoo.toronto.edu (Henry Spencer) writes: >In article <11314@lanl.gov> jlg@lanl.gov (Jim Giles) writes: >>Yes, both of the shells that are bundled with versions of UNIX _do_ >>automatically trash (that is, 'process') the command line arguments to >>expand wildcards. Explains why I don't use the bundled command shells >>much. This is a choice that _should_ be left to the discretion of the >>utility writer. > >Wrong. Then -- as seen repeatedly in other operating systems -- every >command does it differently, and a lot of them don't do it at all. >-- I do not see why you are taking this as a given. I am an OS development programmer at WICAT (actually the only one left.) Our OS called WMCS which has flavours of both Unix and VMS does not have this problem. There are library routines to parse the command line. The progammer declares a structure in his program telling which arguments are required, which are optional, which are positional, etc, along with default values (if any) if an argument was not specified. The command line routine cmdline() is then called. This routine will prompt the user for any required arguments that the user did not specify, and then returns a nicely formatted array of structures with information about the command line to the program. File wildcarding is another library routine, and includes the traditional *,? multiple wildcarded specifications separated by commas, (such as x*y,a*z) and also includes such things as, :since= :before=, :filesize=, :owner=, :filetype=, :exclude= and several others. _ALL_! utilities that we provide that will operate on a file take a FILE LIST as an argument and perform the wildcarding. _ALL_ utilities use the command line parsing routine. Why is this so? Because it seemed sensible at the time for us to do it that way? Just because somebody sometime did an OS that had inconsistent commands does not condemn the practice of having the programs handle command line processing instead of the shell. I would think it would say something about the people that did the shoddy work instead. --------------------------------------------------------------------------- I _don't_ live for the Leap! ..uplherc!wicat!sarek!gsarff