UNIX Shells by Example

Author: Ellie Quigley
Publisher: Prentice Hall
E-mail: corpsales@prenhall.com
Price: $49.95 US
ISBN: 0-13460-866-6
Reviewer: Ben Crowder
Unix Shells by Example truly fulfills the claim made in the title: over 630 examples are in the book, plus another 60 in the first appendix. If you want to learn shell programming, this book is a must-have.
The first chapter introduces the three major shells: the Bourne shell, the C shell and the Korn shell. The Bourne Again shell (bash), the one used by most Linux users, isn't specifically covered, but the information on the other three shells usually applies. A history of each shell, plus the theory behind shells is given. Where the shell comes in on a UNIX system is described, as well as more general UNIX topics such as file attributes and permissions.
Chapter Two, “The UNIX Tool Box”, gives a very useful explanation of regular expressions which applies to much more than shell programming; for example, searching for text within Emacs or vim is built on basically the same principle. Over the next six chapters, what are considered to be three of the more important UNIX tools in regard to shell programming are covered.
Our friend grep appears in the third chapter—the meaning behind the name, how it works, and how to use it (with, of course, extensive examples). Chapter Four covers sed, the Streamlined Editor—again, replete with examples.
The next three chapters describe awk--the history, the input format, records and fields, patterns and actions, script files, comparison expressions, variables, pipes, loops and arrays, to name just a few topics. This section is quite extensive and very useful. I would have to agree with the author that these three are among the most important of all text processing utilities.
Each of the three major shells is covered in a separate chapter. Chapter Eight introduces the Bourne shell, discussing topics such as variables, metacharacters, file-name substitution, pipes, functions, arithmetic, looping and the built-in shell commands, in addition to many other subjects of interest.
The C shell appears in the next chapter. Each shell is given basically the same treatment: the first section of the chapter is devoted to the interactive shell (aliases, job control, the environment, redirection, etc.), while the second section covers programming in that shell (loops, flow control, arithmetic, etc.). Chapter Ten goes over the Korn shell in the same manner.
Appendix A lists useful utilities for shell programmers. These are stock UNIX programs, such as at, mv, passwd and so on. Quite a few examples are given (sixty, to be precise), as well as usage information and a short description. Appendix B provides a table for comparing the three shells. This is an invaluable resource for those who need to port shell scripts from one shell to another. For example, the table shows you how, in each shell, to assign the output of a command to a variable. In the C shell you use set d='date', in the Bourne shell you use d='date', and in the Korn shell you use d=$(date) or d='date'. Appendix C explains clearly and concisely how to use quoting correctly, especially for those tricky problems where you have multiple layers of quotes. The attached CD comes with all source code given in the book.
So, is the book worth your time and money? Yes, very much so. I found the examples to be particularly helpful, illustrating concepts far more clearly than prose could possibly do. If you're interested in shell programming, or even if you're just curious about shells in general, get over to your local bookstore and buy this book.

Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- RSS Feeds
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- Dart: a New Web Programming Experience
- Developer Poll
- What's the tweeting protocol?
- May 2013 Issue of Linux Journal: Raspberry Pi
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.




4 hours 4 min ago
4 hours 51 min ago
6 hours 24 min ago
8 hours 1 min ago
9 hours 59 min ago
10 hours 16 min ago
10 hours 46 min ago
10 hours 47 min ago
10 hours 47 min ago
13 hours 48 min ago