UKUUG home


(the UK's Unix & Open Systems User Group)






Book Discounts

Other Discounts

Mailing lists






Classic Shell Programming

Arnold Robbins and Nelson H F Beebe
Published by O'Reilly and Associates
558 pages
£ 24.95
Published: 24th May 2005
reviewed by Jan Wysocki
   in the December 2005 issue (pdf), (html)

This book is comprehensive and reassuringly dense (over 500 pages). It not only teaches you shell scripting, but also champions the early Unix ``Software Tools'' philosophy. It has the feel of a `golden age' O'Reilly book. Working as a Unix Systems Administrator, I've been writing and mending shell scripts for over 15 years. I like to have Bruce Blinn's slender ``Portable Shell Programming'' (Prentice Hall, ISBN 0-13-451494-7) on my desk, but this will become another companion.

As a lot of my administrative scripts reach out across the network, I immediately looked for comparable material in the book. Carefully hidden in Chapter 8 ``Production Scripts'', there's a dissection of a script to automate software builds across a heterogeneous network of servers. Nothing like my scripts, but deeply instructive. One you've started looking, you can browse endlessly in this book.

It's comprehensive. So it not only teaches you how to deal with, for example, localisation or filesystem searches, but also includes a chapter to get you writing awk scripts. The primary theme is shell scripting, with the assumption that you want to create portable, Posix compliant programs. The authors' approach avoids tedious discussion of shell idiosyncrasies and gets on with the task in as straightforward a way as possible. When you want to know about shell differences, there is a handy chapter on portability issues and extensions.

The style of this book is relaxed but exact. Some of the explanations can be very basic, but then this is far from a ``Nutshell'' book. They get quite wordy from time to time, but if you want a book to read on the train, it's exactly the sort of style that I need.

This book is full of nuggets of advice and interesting asides, far too many to list. I think the main shortcoming of this book is a lack of organisation. I was disappointed by the summaries at the end of each chapter, they're just brief reminders of the topics covered. I'd prefer heavier digests of the chapter material. I'm sufficiently enthusiastic to think that this book should be considerably bigger, or divided into further volumes. I'd like to see more material on scripting across network connections, and interactions with the multiple layers built upon Unix, but perhaps it's time for a rethink. This book maybe shows the limits of shell programming, what once was the all powerful tool for the Systems Administrator can sometimes be inadequate faced with some modern applications. Perhaps we need some additions to the toolbox, but in the meantime this is a good reference for the scripting tools we have.

Have I learned anything? Well for a start I think they've convinced me that I really should stop using echo and stick with printf even though their book is liberally sprinkled with echos. I now know some words with 6 or 7 consecutive vowels and I've learned to appreciate a few more command options. I'm not sure if I'm going to use awk for floating point arithmetic though, I'm happy with dc and they don't consider it.

If you want to take the trouble to learn how to write robust, portable shell scripts, or you want to improve your skills, I thoroughly recommend this book. I should add that it's the programming style that's ``classic'', not the shells. You'll find material on zsh if that's what you want!

Back to reviews list

Tel: 01763 273 475
Fax: 01763 273 255
Web: Webmaster
Queries: Ask Here
Join UKUUG Today!

UKUUG Secretariat
More information

Page last modified 02 Apr 2007
Copyright © 1995-2011 UKUUG Ltd.