Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jan 2002 19:45:10 -0700
From:      "Charles Burns" <burnscharlesn@hotmail.com>
To:        questions@freebsd.org
Subject:   Re: shells confusion
Message-ID:  <F175hKktkpgnkTlhkQL0000d1a9@hotmail.com>

next in thread | raw e-mail | index | archive | help
>i'm planning to learn shell programming but i'm not sure
>on which one to choose...
>
>i've been reading in the 'FreeBSD unleashed' that people
>wanting to do shell programming should stay away from
>c-shell as it's realy good for interactive, but very bad
>for scripts. is this true?
>
>also, looking into the scripts in /etc, i see a line on the
>top saying 'bin/sh'. so are they all written in 'sh' and
>not csh ? if so, why freebsd comes with csh as default?
>
>also, why single user mode proposes /bin/sh as default?
>is there any particular reason for it?
>
>i'm a bit confused on which shell to pick from programming.
>also i've been thinking of perl, but for the moment i think
>i've got to learn at least how to do basic shell programming,
>not only to write programs, but also to understand scrips that
>come with the system.
>
>but the question is 'which shell' ...
>
>any advice on this matter will be appreciated.

By far "BASh" (Bourne Again Shell) is the most popular Unix shell, 
especially in Linux. BASh is compatible with Sh as well, so learning Sh 
scripting will work in BASh. Sh is also by far the most common shell to 
script for, as pretty much every Unix OS has a shell that will run Sh 
scripts. I would probably recommend learning Sh/BASh scripting. BASh has 
some features that Sh generally does not, but you can do most anything 
without them. Sh is also a very powerful scripting language, for example I 
have a full x86 assembler on my system written in pure Sh script.
As to why Sh is default, I have heard reasons like, "It uses less memory", 
"It uses less disk space", "most scripts are written for Sh specifically", 
etc. As far as compelling reasons why the ancient, horrible shell is still 
default, I have heard none.

Charles Burns

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F175hKktkpgnkTlhkQL0000d1a9>