csh problem involving nested ifs?

Mike McNally m5 at lynx.uucp
Sat Jul 15 02:15:18 AEST 1989


rbj at dsys.ncsl.nist.gov (Root Boy Jim) writes:

>I disagree. CSH is much more natural to use than SH. The constructs are
>more natural. 

Like the nightmare of trying to continue quoted strings across lines?
(OK, OK, a backslash or two isn't that bad).  C shell variable manipulation
always confuses me too.  Then again, the quaint Bourne shell technique of 
using "set $blah" to implement arrays is a bit crude.  The bizarre csh
problems with nested complex commands are of course a true pain (like
the way quotes magically disappear after the first iteration of a loop...).

>                  In csh, I don't have to resort to `expr' and `test'
>because these are builtin. 

Agreed, although getting at test via [ ... ] isn't painful.

>                         The only things I see SH is good for are:
>	1) portability - sh exists everywhere
>	2) trivial scripts - starts faster
Like *lots* faster.  32K!!!!
>	3) complex file redirection - but how often do you do 3> anyway?
Never.
>	4) shell fns - neat
I guess.
>	5) piping to `for' and `while' - but how often?
**** a l l   t h e   t i m e !!!!!!!!!!!!!  This is in my opinion
one of the nicest things about the Bourne shell (or maybe it's one
of the worst things about the C shell).

>Of course, newer SH's and KSH help quite a bit.
Give me version 7 sh or give me death!

>	Root Boy Jim
>	Have GNU, Will Travel.

Why am I posting this?  Maybe somebody should yell at me for wasting
bandwidth.

-- 
Mike McNally                                    Lynx Real-Time Systems
uucp: {voder,athsys}!lynx!m5                    phone: 408 370 2233

            Where equal mind and contest equal, go.



More information about the Comp.unix.wizards mailing list