seeking shell scripting resources

David Fleck david.fleck at
Sun Feb 22 08:01:31 PST 2004

On Sun, 22 Feb 2004, Julien Gabel wrote:
> Haven't found much around at all on shell programming and would like
> to start learning it. Any more resources would be most welcome to find
> out about.

Shells differ in their programming constructs, so anything you learn in
one shell may not be transferrable to others.  As a personal preference, I
usually try to write scripts for /bin/sh (for portability), unless I need
a ksh or bash construct.  bash is a variant of sh, with a lot of bells and
whistles added, so techniques that work in bash *usually* work in sh (and

With that preface, you might try as a
start.  It's bash-oriented, but a lot if it will apply to other shells (sh
and ksh, not so much csh and tcsh) as well.

And your system scripts are also an excellent place to learn by example.

David Fleck
david.fleck at

More information about the freebsd-questions mailing list