which shell to learn "Shell programming"?!

redjupiter redjupiter at ntlworld.com
Wed Nov 20 21:37:54 GMT 2002

On Wed, 2002-11-20 at 19:18, Tom Hukins wrote:
> 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?

v. briefly: I found myself administering about 10 machines at work (as a
test). I am no administrator by any standard. Our habit of working is
changing (we no longer have fancy tools to play with. Saving on licences
and what have you). 

So we setup some machines to play with and investigate as an alternative
to NT and as a development environment (we are a small embedded company
who is trying to save money and stay alive :-) )

We finally settled (no I won't mention any other OSes) on FreeBSD for
ease of use and installation. i.e. easy to take care of the kernel and
the option to just install the core system and build the rest as we
wish, thus keeping it lean and mean.

I find myself repeating little tasks here and there. We got a lot of
utilities and scripts which we found useful and so we want to learn it,
understand it and modify to suit our needs. Like starting up services
and servers, firewall scripts, network scripts, backups, revision
control scripts and ... etc.

> > > 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.
> Yes, see:
> http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
> 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.
> Tom

We are investigating Perl and we have downloaded some tutorials, any
recommendation (free for now :-) ).

> ------ FreeBSD UK Users' Group  -  Mailing List ------
> http://listserver.uk.freebsd.org/mailman/listinfo/freebsd-users

So it is a chance for me to acquire new skills. why not!!


More information about the Ukfreebsd mailing list