[comp.unix.questions] VMS vs. UNIX

SULLIVAN%suny-bing.csnet@RELAY.CS.NET (05/21/87)

Those who think that vms is superior to bsd for "number crunching" are
probably comparing vms fortran programs to bsd f77 programs.  Try running
the same programs under ultrix with the vax-11 for ultrix fortran compiler.
(ok, it costs $3000 for a microvax, but it costs that much to run it under
vms also).

Regardless of limits on the number of commands remembered, the command
editing facility of vms (invoked with up-arrow) is one of the few things
really nice about vms.  Shell-writers' alert!  such a facility would be a
very fine addition to unix.  how unfortunate for vms that it only works (along
with everything else) if you have a vt100 or equivalent terminal.  I'm 
convinced that DEC waited until they were no longer making money from terminals
to support Ultrix!

Fred Sullivan
Dept. Math. Sci.
SUNY @ Binghamton
sullivan @ suny-bing.csnet

gwyn@brl-smoke.UUCP (05/21/87)

In article <7494@brl-adm.ARPA> SULLIVAN%suny-bing.csnet@RELAY.CS.NET writes:
>Regardless of limits on the number of commands remembered, the command
>editing facility of vms (invoked with up-arrow) is one of the few things
>really nice about vms.  Shell-writers' alert!  such a facility would be a
>very fine addition to unix.

This feature has been available for UNIX shells for some time.
There is even a general command-line editing front-end for
more-or-less arbitrary programs available from the AT&T UNIX
System ToolChest (be warned that it has control characters
embedded in the source code).  BRL's enhanced SVR2 Bourne shell
(the one with job control) now supports command history and
EMACS-style editing.

mkhaw@teknowledge-vaxc.ARPA (Michael Khaw) (05/21/87)

in article <7494@brl-adm.ARPA>, SULLIVAN%suny-bing.csnet@RELAY.CS.NET says:
> Regardless of limits on the number of commands remembered, the command
> editing facility of vms (invoked with up-arrow) is one of the few things
> really nice about vms.  Shell-writers' alert!  such a facility would be a

Ksh is not a standard component of 4bsd/Ultrix, but you can get it, and it
does history editing using your choice of emacs or vi commands (unfortunately
you lose filename completion via ESC, because emacs uses ESC a lot).  It uses
arrow keys to move fore/backwards in the history list, and is not tied to
vt100s.

I suppose it's more user-friendly and arguably more "obvious" to handle command
history a la ksh or vms dcl, but I find the arcane csh history syntax oddly
more productive.

Mike Khaw
-- 
internet:  mkhaw@teknowledge-vaxc.arpa
usenet:	   {hplabs|sun|ucbvax|decwrl|sri-unix}!mkhaw%teknowledge-vaxc.arpa
USnail:	   Teknowledge Inc, 1850 Embarcadero Rd, POB 10119, Palo Alto, CA 94303

terryl@tekcrl.TEK.COM (05/22/87)

In article <7494@brl-adm.ARPA> SULLIVAN%suny-bing.csnet@RELAY.CS.NET writes:
+Those who think that vms is superior to bsd for "number crunching" are
+probably comparing vms fortran programs to bsd f77 programs.  Try running
+the same programs under ultrix with the vax-11 for ultrix fortran compiler.
+(ok, it costs $3000 for a microvax, but it costs that much to run it under
+vms also).
+
+Regardless of limits on the number of commands remembered, the command
+editing facility of vms (invoked with up-arrow) is one of the few things
+really nice about vms.  Shell-writers' alert!  such a facility would be a
+very fine addition to unix.  how unfortunate for vms that it only works (along
+with everything else) if you have a vt100 or equivalent terminal.  I'm 
+convinced that DEC waited until they were no longer making money from terminals
+to support Ultrix!

     Well, then I suggest you check out tcsh. We've been running it here for
at least 3 years on a VAX running UNIX, and since we got it off of the net,
I think it might have been running even before that. It has all of the command
line editing, and it will run on any ascii crt terminal.

     The only problem with it is that it consists of diffs to the regular csh
sources, and as such you need a source license for it.

     You mean VMS is still doing that (ONLY supporting vt100-type terminals
for any kind of screen-oriented programs)??? That was one of my main com-
plaints in having to use VMS (and I haven't had to use VMS since version 1.6).

guy%gorodish@Sun.COM (Guy Harris) (05/22/87)

> Ksh is not a standard component of 4bsd/Ultrix, but you can get it, and it
> does history editing using your choice of emacs or vi commands (unfortunately
> you lose filename completion via ESC, because emacs uses ESC a lot).

Well, not really; "ksh" can be tweaked so that, for example,
<ESC><ESC> and <ESC>^D in EMACS mode do what <ESC> and ^D do when
"filec" is set in the C shell.  (In "vi" mode, the problem doesn't
exist.)

> It uses arrow keys to move fore/backwards in the history list, and is
> not tied to vt100s.

Unfortunately, those two don't go together, unless you have "ksh"
figure out from a "termcap" or "terminfo" entry what the arrow keys
are.  Since it doesn't use "termcap" or "terminfo", it can't do so;
it would either have to have the arrow keys wired in or not use them,
and in this case it doesn't use them.  In EMACS mode, you use ^N and
^P to move up and down; in "vi" mode, you use "k" and "j".
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy@sun.com

ram@nucsrl.UUCP (Renu Raman) (05/22/87)

>Regardless of limits on the number of commands remembered, the command
>editing facility of vms (invoked with up-arrow) is one of the few things
>really nice about vms.  Shell-writers' alert!  such a facility would be a
>very fine addition to unix.  how unfortunate for vms that it only works (along
>with everything else) if you have a vt100 or equivalent terminal.  I'm 
>convinced that DEC waited until they were no longer making money from terminals
>to support Ultrix!


      Heard of a shell called 'tcsh' (t-shell)?  Well, its better than
      your vms command line history mechanism.  You can bind any key to
      any of the built-in functions (just say "bind up_history <^char>".
      Also, command line editing is like EMACS.  You can use arrow keys
      or any key to move left/right, delete word forward/backward,
      go to end of line/beginning of line...... Also inlcuded are 
      goodies such as
	 
	   1.  Interactive file/directory listing.  Just type "," and
	   it lists files/directories under the current path.
	   (If a , is hit before completing the first word in a command line
	   or after a "|" symbol, it lists commands, in your path, that
	   match the set of characters that you have typed.
	     i.e. "uu," will result in
		uusend uulog uucp uuq .....

	   2.  Spelling correction of mispelt commands/files

	   3.  Built-in "which" - Type a command and hit an escape sequencs
	   (happens to be <esc>w in my case), you will get the path name
	   for that command (it is faster than "which" or "whereis").

	   4. Type ^<space> or ^@ after typing a command, lo and behold
	   you will get the man page 'catted' on your screen.

           5. Command line completion.  If you have a file called
	   "This_is_a_very_long_name".  Just type say "less This<esc>"
	   it will complete the file name for you.  Isn't that neat.


      and many many more.  It is a super-set of "csh" and wonder why
      it is not supported/distributed with standard BSD distributions.
      My guess is that if you have BSD license, you should be able to get
      this, but then again I could be wrong.

      Now I dare if VMS(DCL) has all these features.
>Fred Sullivan
>Dept. Math. Sci.
>SUNY @ Binghamton
>sullivan @ suny-bing.csnet
-------------------
Renu Raman				UUCP:...ihnp4!nucsrl!ram
1410 Chicago Ave., #505			ARPA:ram@eecs.nwu.edu
Evanston  IL  60201			AT&T:(312)-869-4276               

gwyn@brl-smoke.ARPA (Doug Gwyn ) (05/23/87)

In article <19489@sun.uucp> guy%gorodish@Sun.COM (Guy Harris) writes:
>> It uses arrow keys to move fore/backwards in the history list, and is
>> not tied to vt100s.
>Unfortunately, those two don't go together, unless you have "ksh"
>figure out from a "termcap" or "terminfo" entry what the arrow keys
>are.

Our solution for this is to allow the user to set his key bindings.
This can be done on a per-shell invocation basis if desired.  I used
this technique back when I was using a VT100 to assign all the keypad
escape sequences to editing functions (it took two levels of mapping).

dave@sq.UUCP (05/23/87)

In article <7494@brl-adm.ARPA> SULLIVAN%suny-bing.csnet@RELAY.CS.NET writes:
>Regardless of limits on the number of commands remembered, the command
>editing facility of vms (invoked with up-arrow) is one of the few things
>really nice about vms.  Shell-writers' alert!  such a facility would be a
>very fine addition to unix.

Be Warned. The history mechanism in vms can cause problems with dcl scripts.
If you have a script that prompts the user for a password that locks
the screen (for example). The script traps the interrupts and turns of echo
until the correct password is entered. If a user types the up-arrow the
password is entered correctly from the history!  This is prevented by
ensuring that you turn of the history in such scripts.

					David R. Seaman
------
You must excuse my waiter, for he is from Barcelona.  - F.T.
{utai,utzoo}!sq!dave	UUCP
dave@sq.utoronto.edu	BITNET

SoftQuad Inc. (home of sqtroff)
720 Spadina Ave
Toronto, Ontario, Canada
(416) 963-8337

ram@nucsrl.UUCP (Renu Raman) (05/24/87)

>     Well, then I suggest you check out tcsh. We've been running it here for
>at least 3 years on a VAX running UNIX, and since we got it off of the net,
>I think it might have been running even before that. It has all of the command
>line editing, and it will run on any ascii crt terminal.
[much deleted]


      The sources that I have comes across, have been for VAX.  Funny
      that the sources has(d) a file doprnt.c, which was actually
      vax assembler than a C source file.  While porting tcsh to
      a Gould machine, I relplaced doprnt.c with a copy of doprnt.c from
      the csh sources of Gould machine all worked fine and dandy.  

      One could use "printf.c" from "vi".  Actually, a friend of mine
      used vi's copy from a VAX while porting tcsh to a SUN 3/160 !!


      Now, to a problem that VMS solves (I believe) and UNIX does not
      (again I believe).


	  I run a looong troff and it gets spooled on printer LaserX.
	  Then I realize, spooler for LaserX is grungy and somehow
	  (either daemon has died or simply a hardware problem with LaserX)
	  files get spooled to the printer queue, but not printed.
	  Now, in my installation, I have LaserY, which could be used too.
	  Instead of re-running troff, if I could just respool it to printer
	  queue of LaserY,  I would save lots of CPU time
	  as well as cribs from other users (Imagine a 300 page troff)
	  Any suggestions, as to how this could be done on say BSD4.3?

-------------------
Renu Raman				UUCP:...ihnp4!nucsrl!ram
1410 Chicago Ave., #505			ARPA:ram@eecs.nwu.edu
Evanston  IL  60201			AT&T:(312)-869-4276               

xsimon@its63b.ed.ac.uk (Simon Brown) (05/24/87)

In article <19489@sun.uucp> guy%gorodish@Sun.COM (Guy Harris) writes:
>
>> It uses arrow keys to move fore/backwards in the history list, and is
>> not tied to vt100s.
>
>Unfortunately, those two don't go together, unless you have "ksh"
>figure out from a "termcap" or "terminfo" entry what the arrow keys
>are.  Since it doesn't use "termcap" or "terminfo", it can't do so;
>it would either have to have the arrow keys wired in or not use them,
>and in this case it doesn't use them.  In EMACS mode, you use ^N and
>^P to move up and down; in "vi" mode, you use "k" and "j".

Ummm, if it doesn't use termcap/terminfo, then presumably it makes all sorts
of unsafe assumptions about how your terminal works - otherwise editing of
any kind would be impossible. (Eg, it has to know how to backspace, at the 
very least, and to edit multiple lines simultaneously it would have to know
how to move the cursor up and down). What happens if your terminal uses
some character other than \b for backspacing (as specified by a "bc" termcap 
entry)?

[Disclaimer: I've never used ksh very seriously. Perhaps its not possible to
edit lots of lines at once - unless you start up a "real" editor]


-- 
----------------------------------
| Simon Brown 		         | UUCP:  seismo!mcvax!ukc!{its63b,cstvax}!simon
| Department of Computer Science | JANET: simon@uk.ac.ed.{its63b,cstvax}
| University of Edinburgh,       | ARPA:  simon%{its63b,cstvax}.ed.ac.uk ...
| Scotland, UK.			 |				@cs.ucl.ac.uk
----------------------------------	 "Life is full of woe, don't you know!"


-- 
----------------------------------
| Simon Brown 		         | UUCP:  seismo!mcvax!ukc!{its63b,cstvax}!simon
| Department of Computer Science | JANET: simon@uk.ac.ed.{its63b,cstvax}
| University of Edinburgh,       | ARPA:  simon%{its63b,cstvax}.ed.ac.uk ...
| Scotland, UK.			 |				@cs.ucl.ac.uk
----------------------------------	 "Life's like that, you know"

guy@gorodish.UUCP (05/25/87)

> Ummm, if it doesn't use termcap/terminfo, then presumably it makes all sorts
> of unsafe assumptions about how your terminal works - otherwise editing of
> any kind would be impossible.

Nope.  It makes only some simple assumptions, that should be true on
anything other than a truly wretched terminal.

> (Eg, it has to know how to backspace, at the very least, and to edit
> multiple lines simultaneously it would have to know how to move the
> cursor up and down). What happens if your terminal uses some character
> other than \b for backspacing (as specified by a "bc" termcap entry)?

You lose, but so what?  If ^H does something other than moving the
cursor one position to the left (e.g., something truly idiotic like
sending it home), the "crt rubout" modes provided by many UNIX tty
drivers won't work either.  The only reasonable things ^H can do are
to move the cursor one position to the left destructively or
non-destructively.

Most of the terminals in the termcap database do not have a "bc"
entry, so they presumably move the cursor one position to the left
non-destructively when they get a ^H.  It's not clear it's worth the
extra complexity to make "ksh" support the few remaining terminal.

> [Disclaimer: I've never used ksh very seriously. Perhaps its not possible to
> edit lots of lines at once - unless you start up a "real" editor]

It's not.  That's why it doesn't need to know how to move the cursor
up and down.
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy@sun.com

gwyn@brl-smoke.UUCP (05/27/87)

In article <3680018@nucsrl.UUCP> ram@nucsrl.UUCP (Renu Raman) writes:
-	  Instead of re-running troff, if I could just respool it to printer
-	  queue of LaserY,  I would save lots of CPU time
-	  as well as cribs from other users (Imagine a 300 page troff)
-	  Any suggestions, as to how this could be done on say BSD4.3?

Yes, run MDQS (available free from BRL) or some other decent spooler
instead of the antique you seem to have.

This isn't a UNIX-vs-VMS issue, unless you assume that (as in VMS)
system utility software cannot be easily replaced.

mike@BRL.ARPA (05/28/87)

Of course, if you are using TCSH (Tenex style CSH) or TBSH (Tenex
style Bourne Shell), then you have command-line editing,
file name completion, history editing, etc, etc, all available to
you.  It's as simple as installing another Shell.

Send TCSH requests to <Phil@brl.arpa> and TBSH requests to
<DPK@brl.arpa>, not me.
	-Mike

kathy@wrcola.UUCP (05/28/87)

In article <19625@sun.uucp> guy%gorodish@Sun.COM (Guy Harris) writes:
>> [Disclaimer: I've never used ksh very seriously. Perhaps its not possible to
>> edit lots of lines at once - unless you start up a "real" editor]
>
>It's not.  That's why it doesn't need to know how to move the cursor
>up and down.

I'm coming in at the end of this discussion, so if someone else
has already said what I'm about to say, well ...

You *can* edit several lines at ones with ksh - sort of.  Go into
ksh edit mod by hitting the ESC key and then immediately hit
the 'v' key.  That puts you into vi, with the current command
in the file.  You can write a several-line ksh script and,
when you write and quit vi, the script is executed.


Kathy Vincent                           AT&T, Winston-Salem, NC
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
AT&T:	{ihnp4|mtune|burl}!wrcola!kathy
        {ihnp4|mtune}!wruxh!unix
Home:	{ihnp4|mtune|ptsfa|codas}!bakerst!kathy

n059gj@tamuts.tamu.edu (Venkataratnam Ghanta) (03/13/91)

	I am  doing a project which needs comparision between the Unix and 
the VMS operating systems. I would like to have as many diff. as possible 
and in as much detail as posssible from all angles .

Email address : n059gj@tamuts.tamu.edu
US Mail: V C Ghanta
	 4302 college main #339
	 Bryan 
	 Texas 77801
	 USA.