Authors: Ellie Quigley, Scott Hawkins
Publisher: Prentice Hall PTR
So, you want to learn Linux shell programming? This text and CD-ROM package covers the essential Linux shells (bash and tcsh) and three key Linux shell programming utilities (grep, sed, GNU awk). Ellie Quigley – Silicon Valley’s top shell programming instructor starts from scratch and gets you all the way to expert-level techniques.
In 1991, Linus Torvalds, a Finnish college student, developed a UNIX-compatible operating system kernel at the University of Helsinki, Finland. What started as one man’s hobby has become the fastest growing rate server OS and a serious threat on the desktop (client-side) to Microsoft’s Windows OS. When writing new utilities or adding enhancements to the existing ones, Linux software is almost 100% compliant with POSIX standards in order to provide software portability across different platforms and provide a UNIX-like computing environment. Commitment to open software standards and protocols is on of the major Linux strengths.
Inside the book
The introductory text discuss also the definition and function of a shell, system startup and login shell, processes and the shell, the environment and inheritance and executing commands from scripts topics.
This book is a big tom. The authors present 11 chapters, although the book could be logically divided into five major parts.
Regular Expressions – Before someone can fully appreciate the power of grep, sed, and gawk a good foundation in the use of regular expressions and regular expressions metacharacters is required. This section empowers you with the knowledge of regular expressions definition, regular expression metacharacters concepts, and how to combine regular expression metacharcaters.
The grep Family – The UNIX grep family consists of the commands grep, egrep, and fgrep. Linux uses the GNU version of grep, which in functionality is much the same as grep, but better. This section cover the grep commands, and shows off how grep works, basic and extended regular expressions usage, pointing out the differences between the variants of Linux grep commands and their UNIX namesakes.
The Streamlined Editor – In chapter 4 the sed command is presented. This section starts with an introduction to sed and explains the basic differences between a streamlined non-interactive way the sed work, and the interactive way of vi for example. There is a lot of sed examples of printing, deleting, substitution, range of selected lines, multiple edits, reading from files, writing to files, appending, inserting, next, transform, sed scripting…
The gawk Utility – The gawk section has a really in-depth coverage. To the gawk utility the authors dedicated three chapters. Chapter 5 covers awk, awk’s format, formatting output, awk commands from within a file, record and fields, patterns and actions and regexps topics. Chapter 6 continues the discussion on awk with the comparison expressions, and chapter 7 covers variables, redirection and pipes, pipes, closing files and pipes, conditional statements, loops, program control statements, arrays, akw built-in and user-defined functions.
The Interactive Shell And Shell Programming – The rest of the book in much the same way but respecting the differences between the two shells covers the interactive bash and tc shell, and programming with the bash and tc shell.
Chapter 8 covers the interactive bash shell, and in chapter 10 the interactive tc shell topics are covered. Among the topics covered in these chapters are command line shortcuts, variables, job control, manipulating directory stack, command and file name completion, history, quoting, aliases, functions, standard I/O redirection, globbing, wildcards, etc.
Chapter 9 cover bash shell programming and chapter 11 cover tc shell programming. Reading user input, Arithmetic, Positional parameters and command line arguments, Conditional constructs and flow control, Looping commands, Functions, Trapping signals, Debugging, Processing command line options with getopts, Eval command, Bash options, Shell built-in commands are some of the subjects discussed in these two chapters.
This book is written with clarity and conciseness, traits so often missing from computer books. Whether you’re a system administrator, application developer, or power user, this book is for you.
If you’re a Linux newbie and want to sharp your shell programming skills, this book is for you, although probably you’ll want to read also a more general book about Linux such as Running Linux by Matt Welsh, et al.
If you already have some UNIX experience you’ll also want to read this book, because Linux shells and utilities covered in this book are enhanced with a lot of new features not available in their UNIX counterparts.
The CD-ROM contains all of the source code and data files from the book, and also a copy of the book in HTML format.
What I think of it
When you purchase this book, you’re in effect purchasing a sliver of the combined knowledge of both authors in the Linux shells programming field. You’ll find a lot of examples in this book. For almost any command, syntax or concept covered, there is a screen shot or a graphical explanation which stands as a proof of concept. On scale of 1 – 5 (1 being the lowest possible grade) I can give it 5 and recommend this book to anyone who wants to master the Linux Shell programming environment.