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-29 09:53:51 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!newsfeed.direct.ca!look.ca!border1.nntp.aus1.giganews.com!nntp.giganews.com!nntp3.aus1.giganews.com!bin2.nnrp.aus1.giganews.com.POSTED!not-for-mail Message-ID: <3C2E03B6.C0D6F6A0@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> <3C2D48CE.FA4FF25A@fsi.net> <3C2DE213.7A92DF0C@bartek.dontspamme.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Date: Sat, 29 Dec 2001 11:53:35 CST Organization: Giganews.Com - Premium News Outsourcing X-Trace: sv3-IWUcJG28A317OdCQtB4eQToOIxENr9UXC4D0mXijbi2jkZZgixyGRbPulkScCd1vxy3cvLEaaIEjVkl!T3CA5MgAMSgyPHRLWwXRKoe8jSI44i2atMAyyiyIMjE23hMIdWQN/G5o1Q== 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: Sat, 29 Dec 2001 17:53:35 GMT Xref: archiver1.google.com comp.os.vms:57309 alt.sys.pdp10:8848 comp.sys.dec:10444 Arthur Krewat wrote: > > "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? > > Write the script to verify command line options, then do it's main work. > Step 1, step 2... ...but then *I* am doing it, not the shell. > [snip] > > How do I get filespec expansion to recurse directories? > > "find". In Bourne shell, a "for a in `find . -type f`" will loop through > all files from "." and below. "find" is an external program, not the shell. > > How do I get the shell to perform simple numeric calculations? ...string > > manipulation (concatenation, reduction ala DCL)? ...conversion from > > binary datatypes to string datatypes (ala F$CVxI())? > > In shell, there is no distinction between numbers and strings. Doing > "A=`expr 2 + 2`" will give you 4 ... bc is another way. Strings? > A=${B}${C} - this concatenates B and C and assigns it to A - can't get > much easier than that. Reduction? use sed/awk, etc. "sed", "awk", etc. are external programs, not the shell. > > How do I get the shell to "export" variables to "outer" levels (ala DCL > > global symbols)? > > From ksh/sh, do ". script", this runs the script and anything defined in > it with "A=thisandthat; export A" will wind up being in your main shell's > environment. O.k. So, how do I get the same effect from a script at, say, a depth of 8 or so to make a variable (or a change in its value) visible to the script at depth 2 or 1? (Answer: you can't without jumping thru a lotta hoops to make a work-around.) > > How do I get the shell to open/process an indexed file (i.e., do C-ISAM > > the way DCL does RMS)? ...return information about the system (ala > > F$GETSYI())? ...return info. re: the crontab or "atd" (ala F$GETQUI())? > > There are basic "read" primitives in the shell, but for more complicated > tasks, awk works well and there are others. ...but here again, that's "awk" or whatever, not the shell. > Information about the system? > A=`uname -a` sets A to (on my system) > "SunOS kilowatt 5.8 Generic_108529-10 i86pc i386 i86pc". uname -r returns > "5.8",etc. etc. How do I retrieve (again, using *ONLY* the shell, not an external program) memory size? ...system parameters? ...nodename? ..., etc.? > > I'm sure there are features of the shells, perl, python, etc. that you > > find useful. To me, it's still all stone-age computing (Linux, Solaris, > > *BSD). > > When I first went to UNIX from VMS, I was considerably lost - within a > few months I was using Bourne shell like it was my first love. It is > considerable easier to program than DCL. In what way? (as I asked in my first post) To quote my 5th grade teacher, "be specific, cite examples, make comparisons". I got my first System 3.7 UNIX system on a no-name M68K box when I still a relative VMS newbie, but with about five years of BASIC Plus-2 and two years of VAX BASIC and DCL behind me - had to learn DIBOL and MS-DOS (ala IBM) at the same time. At the time, thought it (UN*X) was ultra-primitive and feature-poor. Hasn't changed much over the years, IMO. Wish I still had my .exrc script for making "vi" somewhat EDT-like. Dunno. Still sounds to me like DCL has the shells beat hands down in many ways, but the shells have advantages in others. Tough call. Kinda depends what you need. -- David J. Dachtera dba DJE Systems http://www.djesys.com/ Unofficial Affordable OpenVMS Home Page: http://www.djesys.com/vms/soho/