Subject: Re: Compiler Symbols (Re: Compiling the kernel)
To: None <port-arm32@NetBSD.ORG>
From: paul <pwain@nc.com>
List: port-arm32
Date: 02/16/1998 00:55:37
This is a multi-part message in MIME format.
--------------5EF62A73CD09D8173F95A2B5
Content-Type: multipart/alternative; boundary="------------94DACC90716A755EDA7EFF84"


--------------94DACC90716A755EDA7EFF84
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

> You should not use C Shell script. It is considered harmful,
> and the UNIX Power Tools contains an article from the Net that
> explains in detail why.
>

Technically there is nothing wrong with using C-shell for scripting (the -f flag
was provided for that purpose). Oh people will tell you that you cant rely on it
being present on a UNIX machine, yes, but the same is true with borne shells
(people use true borne shell and Borne Again Shell (bash) and Korn Shell, as
/bin/sh and there are interoprability issues to do with the {$name:-} operators
which can be a real pain).

The csh-script I provided was purely because a lot of people on this list will
probably use 'csh' or 'tcsh' at their command line prompt. Learning to build up
simple foreach and while loops at the command line is a useful thing to learn in
any interactive shell environment.

> Personally I have now dropped Bourne Shell and am using Korn
> Shell instead. I can do this since I all OSs I now use (including
> NetBSD) has a Korn Shell implementation.

Each shell has its merits. Comming from SunOS-2/SunOS 3.1 original I prefer
tcsh, sys-V-ites tend to go to ksh, zsh or bash. To be fair a lot of the issues
previously associated with chosing a shell have gone now (even /bin/sh on NetBSD
now has command line history editing - try 'set -o emacs' or 'set -o vi' and hit
up arrow and/or ctrl-P and see what happens). As for the size and load issues
previosly associated with shells (it used to be /bin/sh was very significantly
smaller than its other shell counterparts) is now no longer true.

And to be fair there are things that cant be done in 'sh's that can be done in
'[t]csh' (!$, !-x:y, a more powerful loop , margninally more powerful command
histroy ![tab], etc.) and vice versa (better $variable handling, the @ command,
maginally more structured function handling (did you know you can do functions
in a shell script :),  etc.)

So going back to the original scripts, either will work and get the job done,
just that you dont believe the purists who will tell you that you have to do it
in one scripting language or another (I had a long debate with John Dyson over
something very similar a few weeks back on why I never use perl and always use C
and we didnt really agree to differ we just agreed that both are right and
wrong).

So I wont flame you over which shell you use and you dont flame me over which
one I use. :)

Paul
(who if he had a dollar for every my-shell is better for scripting war that he's
seen would be a very very rich person indeed)

--------------94DACC90716A755EDA7EFF84
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML>

<BLOCKQUOTE TYPE=CITE>You should not use C Shell script. It is considered
harmful,
<BR>and the UNIX Power Tools contains an article from the Net that
<BR>explains in detail why.
<BR>&nbsp;</BLOCKQUOTE>
Technically there is nothing wrong with using C-shell for scripting (the
-f flag was provided for that purpose). Oh people will tell you that you
cant rely on it being present on a UNIX machine, yes, but the same is true
with borne shells (people use true borne shell and Borne Again Shell (bash)
and Korn Shell, as /bin/sh and there <B><I>are</I></B> interoprability
issues to do with the {$name:-} operators which can be a <B><I>real</I></B>
pain).

<P>The csh-script I provided was purely because a lot of people on this
list will probably use 'csh' or 'tcsh' at their command line prompt. Learning
to build up simple foreach and while loops at the command line is a useful
thing to learn in any interactive shell environment.
<BLOCKQUOTE TYPE=CITE>Personally I have now dropped Bourne Shell and am
using Korn
<BR>Shell instead. I can do this since I all OSs I now use (including
<BR>NetBSD) has a Korn Shell implementation.</BLOCKQUOTE>
Each shell has its merits. Comming from SunOS-2/SunOS 3.1 original I prefer
tcsh, sys-V-ites tend to go to ksh, zsh or bash. To be fair a lot of the
issues previously associated with chosing a shell have gone now (even /bin/sh
on NetBSD now has command line history editing - try 'set -o emacs' or
'set -o vi' and hit up arrow and/or ctrl-P and see what happens). As for
the size and load issues previosly associated with shells (it used to be
/bin/sh was very significantly smaller than its other shell counterparts)
is now no longer true.

<P>And to be fair there are things that cant be done in 'sh's that can
be done in '[t]csh' (!$, !-x:y, a more powerful loop , margninally more
powerful command histroy ![tab], etc.) and vice versa (better $variable
handling, the @ command, maginally more structured function handling (did
you know you can do functions in a shell script :),&nbsp; etc.)

<P>So going back to the original scripts, either will work and get the
job done, just that you dont believe the purists who will tell you that
you have to do it in one scripting language or another (I had a long debate
with John Dyson over something very similar a few weeks back on why I never
use perl and always use C and we didnt really agree to differ we just agreed
that both are right and wrong).

<P>So I wont flame you over which shell you use and you dont flame me over
which one I use. :)<U></U>

<P>Paul
<BR>(who if he had a dollar for every my-shell is better for scripting
war that he's seen would be a <B>very very</B> rich person indeed)</HTML>

--------------94DACC90716A755EDA7EFF84--

--------------5EF62A73CD09D8173F95A2B5
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Paul Wain
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Paul Wain
n:              Wain;Paul
org:            Network Computer Inc.
adr:            1000 Bridge Parkway;;;Redwood City;CA;94065;USA
email;internet: pwain@nc.com
title:          OS Development Engr.
tel;work:       +1 650 631 4628
tel;fax:        +1 650 631 4680
tel;home:       +1 415 297 6959 (Mobil)
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
version:        2.1
end:            vcard


--------------5EF62A73CD09D8173F95A2B5--