which shell to learn "Shell programming"?!
tom at FreeBSD.org
Wed Nov 20 19:18:22 GMT 2002
On Wed, Nov 20, 2002 at 06:59:36PM +0000, Paul Civati wrote:
> redjupiter <redjupiter at ntlworld.com> wrote:
> > I need to learn to write scripts, which shell should I use?
It depends. Why do you need to learn them? What constraints do you
face? What do you hope to achieve? What skills do you already have?
> > is it the "sh", or ksh or tcsh or csh? I am using FreeBSD-RELEASE 4.7
> I'd probably advise against using csh/tcsh for scripting.
My own personal preference is to use Perl for most scripting work
because it can be easily installed on most systems, I'm very familiar
with it, and lots of extension modules are available on CPAN that make
it easier to do most things I might want to do. I would only use sh
for very simple scripts that must run on a Unix base system without
external packages (sh is more likely to be installed than perl).
Typically, I find people asking me "Can you just add this", which is
easier to do in a more powerful language than with sh.
You might reasonably use one of many other languages, which is why
your own experience and preference has a huge bearing on the best
answer to your question.
More information about the Ukfreebsd