Shell programming style -- a plea for better shell scripts

gwyn%brl-vld at sri-unix.UUCP gwyn%brl-vld at sri-unix.UUCP
Wed Feb 22 18:24:44 AEST 1984


From:      Doug Gwyn (VLD/VMB) <gwyn at brl-vld>

The Bourne shell is not only much faster than the Cshell, it is more
suitable for programming scripts for several reasons, the main one of
which is the ability to redirect I/O of control loop commands.  There
is a form of "subroutine" in the UNIX System V Release 2 Bourne shell.
The only thing that the Bourne shell still does not have that the
Cshell does that is worth having is a "history" mechanism.  Korn put a
hack into the shell to support a generalization of the idea of command
history editing; he wrote the last several commands to a file and then
invoked the editor (your choice via the EDITOR environment variable)
to allow you to edit the history before it was re-executed.

Some people would include "job control" in the Cshell advantages but
this doesn't matter if you have a nice terminal like a Teletype 5620.



More information about the Comp.unix mailing list