From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fdb0e,cdca3dc8d6167cd4 X-Google-Attributes: gidfdb0e,public X-Google-Thread: f7344,a808e23c428d1184 X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,cdca3dc8d6167cd4 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 2001-12-31 16:37:26 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!nf3.bellglobal.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!nntp3.aus1.giganews.com!bin2.nnrp.aus1.giganews.com.POSTED!not-for-mail Message-ID: <3C310556.DFD5D97B@fsi.net> From: "David J. Dachtera" X-Mailer: Mozilla 4.77 [en] (Win95; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.vms,alt.sys.pdp10,comp.sys.dec Subject: Re: historical evidence of what went wrong at DEC References: <3roT7.207043$tf5.13617499@bin5.nnrp.aus1.giganews.com> <3C2E506A.152D03E0@fsi.net> <3C2E9C1C.64718678@fsi.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Date: Mon, 31 Dec 2001 18:37:09 CST Organization: Giganews.Com - Premium News Outsourcing X-Trace: sv3-nRaJUEUwC9+ar14OgRGvjt6WA1p99u5cI2fVzfKYFa97swR7g52PQT27SLZ9Jr4M2EtYuWwVpQkmYov!vRHNS3WEOKL4suXxpVdXC5mSoR6dvobG1Ze6IrU1sIC0O5QskqoqEE2Bnw== X-Complaints-To: abuse@GigaNews.Com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly Date: Tue, 01 Jan 2002 00:37:09 GMT Xref: archiver1.google.com comp.os.vms:57579 alt.sys.pdp10:8934 comp.sys.dec:10632 Peter da Silva wrote: > > In article <3C2E9C1C.64718678@fsi.net>, > David J. Dachtera wrote: > >> >> >How do I get a shell to check/verify command line options and values (if > >> >> >any) before it invokes the program? > > >> >> This doesn't make sense on UNIX, > > >> >Why not? (I suspect the answer may be "for legacy reasons".) > > >> Because UNIX has a completely different command line model than VMS. A UNIX > >> command line is an array of strings, not a structured language construct. > > >Exactly my point. Other than placing itself between the kernel and the > >programmer, teh shell does little or nothing you can't do yourself > >(without the shell). > > Since that's exactly what it's supposed to do, and very little more, what > *is* your point? DCL is a procedural programming language (albeit one with > fairly primitive control structures) that sometimes runs external programs > to perform commands. The UNIX shell is a nearly functional programming > language that primarily controls the dataflow between external programs. ...and DCL is not? You've never seen a truly sophisticated DCL "script" then. > This model turns out to be extraordinarily powerful, and allows you to build > quite sophisticated programs out of simple components. It's nothing like DCL, > and looking at features of DCL and trying to find them in the shell, or to > criticise the shell for lacking them, is like complaining that your new > minivan doesn't come equipped with a movie theatre and grocery store. > > >...but the original poster was comparing DCL to the scripting languages, > >not the external utilities they may invoke. Important distinction. > > The original poster was talking about the ease of programming using the > UNIX shell compared to using DCL. Since you can't do anything in the shell > without external programs, It would probably be more accurate to say that the shell, under the direction of a script, controls how those external programs are used. The actual "scripting" capability comes from the shell, not the CUSPs. Hence, the importance of the distinction between the shell itself and the CUSPs. > it should be obvious to the most naive observer, > at least at this late date in the discussion, that this distinction is > purely an invention of yours and not something intended by the original > poster. Obviously, I cannot agree. You may want to read in O'Reilly's "UNIX in a nutshell" by Daniel Gilly: in Chapter 4 starting near the bottom of page 4-12, the section titled "Built-in Commands (Bourne and Korn Shell)" (ISBN 1-56592-001-5) The difference between internal and external commands was even documented in the MS-DOS documentation, usually in the discussion of the PATH environment variable. There are(were) other VMS CLIs besides DCL, few and obscure as they may be (may have been). The difference between an external and a cliroutine does not become apparent until one begins to study the DCL command tables in depth. See http://www.djesys.com/vms/freevms/proglist.txt for some examples. So, no, I did not "invent" this distinction. It is possible, however, that my understanding of it may be deeper than (or different from) your own. > >> >> the DCL implementations on UNIX. You might as well ask how you chroot > >> >> in VMS. > > >> >Simple: > >> >$ DEFINE/EXEC/SYSTEM SYS$SYSTEM new_path_specification > > >> What happens if you access DUA0: directly at this point? > > >Yes. It's still MOUNTed and available. What's your point? > > Then you haven't performed the equivalent of a chroot. > > Chroot completely replaces the user-level view of the entire file and > device namespace with the newly constructed subset. If I haven't mounted > da0s2 in that namespace, it's not visible. I believe part that may have been snipped from that same post may have gone on to say the the idea of a filesystem "root" does not translate directly to VMS. Essentially, each RVN-1 has an MFD (Master File Directory) and each such MFD is a volume "root". So, the discussion is irrelevant, anyway. > >> >> >How do I get the shell to open/process an indexed file (i.e., do C-ISAM > >> >> >the way DCL does RMS)? > > >> >> You call a utility program to do it. > > >> >Then, the external program is doing it, not the shell. > > >> Again, you can not make that distinction. > > >You not only can, you *MUST*! > > Must I? Why? Read on. > >Try this: find a way to "break" the path to your utility programs > >(clobber the PATH, rename /bin to /binbin, or whatever). Now can you "ls > >*"? (No.) Can you "echo *"? (Yes.) So, yes, the concept of commands > >which are "internal" to the shell vs. those which are not is vitally > >important. > > But why stop there. Let's unmount all the devices, format all the file > systems, and overwrite all the open shared libraries in memory! Hey, now > you can't do anything! ...but you haven't proved anything, either. > I completely fail to see why the behaviour of a system that you've > deliberately broken has any bearing on the utility of the shell as a > scripting environment on a working system. Then ask yourself: do the CUSPs (Commonly Used System Programs) behave differently depending on which shell (read: scripting facility) is used? Get it *NOW*? -- David J. Dachtera dba DJE Systems http://www.djesys.com/ Unofficial Affordable OpenVMS Home Page: http://www.djesys.com/vms/soho/