Shell programming style -- a plea for better shell scripts

Peter Wolfe wolfe at mprvaxa.UUCP
Thu Feb 16 03:21:01 AEST 1984


I agree with most of your comments except that they are very specific to
the Bourne shell.  You brush of C-shell as being very 'unstructured' -
I beg to differ but I find that C-shell syntax is more obvious to a C
programmer than shell.

In practice I use the Bourne shell for small scripts that don't do a lot
of complicated logic (ie. to avoid another process) because it is faster
than C-shell in execution (yes even if C-shell has -f in command line).

I have written some C-shell scripts which are 5-7 pages long and found
C-shell helpful in doing what I want in terms of filename manipulation,
logic expressions etc.

I feel that yet another shell would be appropriate for the UNIX(tm)
environment.  This shell would allow me to do most of the things I
can do in 'C' (eg. subroutines, local variables, file i/o easily) and
also be able to be 'compiled' to execute as fast as possible.  It doesn't
need (in my opinion at least) all the user interface stuff of the history
mechanism and event specification of C-shell.

(I guess I am dreaming - but why not)
-- 

    Peter Wolfe
    Microtel Pacific Research
    ..decvax!microsoft!ubc-vision!mprvaxa!wolfe



More information about the Comp.unix mailing list