This is the Title of the Book, eMatter Edition
Copyright © 2011 O’Reilly & Associates, Inc. All rights reserved.
Preface
|
xv
output with echo and printf, basic I/O redirection, command searching, access-
ing arguments from within a script, and execution tracing. It closes with a look
at internationalization and localization; issues that are increasingly important in
today’s “global village.”
Chapter 3, Searching and Substitutions
Here we introduce text searching (or “matching”) with regular expressions. We
also cover making changes and extracting text. These are fundamental opera-
tions that form the basis of much shell scripting.
Chapter 4, Text Processing Tools
In this chapter we describe a number of the text processing software tools that
are used over and over again when shell scripting. Two of the most important
tools presented here are
sort and uniq, which serve as powerful ways to orga-
nize and reduce data. This chapter also looks at reformatting paragraphs, count-
ing text units, printing files, and retrieving the first or last lines of a file.
Chapter 5, Pipelines Can Do Amazing Things
This chapter shows several small scripts that demonstrate combining simple
Unix utilities to make more powerful, and importantly, more flexible tools. This
chapter is largely a cookbook of problem statements and solutions, whose com-
mon theme is that all the solutions are composed of linear pipelines.
Chapter 6, Variables, Making Decisions, and Repeating Actions
This is the first of two chapters that cover the rest of the essentials of the shell
language. This chapter looks at shell variables and arithmetic, the important
concept of an exit status, and how decision making and loops are done in the
shell. It rounds off with a discussion of shell functions.
Chapter 7, Input and Output, Files, and Command Evaluation
This chapter completes the description of the shell, focusing on input/output,
the various substitutions that the shell performs, quoting, command-line evalua-
tion order, and shell built-in commands.
Chapter 8, Production Scripts
Here we demonstrate combinations of Unix tools to carry out more complex
text processing jobs. The programs in this chapter are larger than those in
Chapter 5, but they are still short enough to digest in a few minutes. Yet they
accomplish tasks that are quite hard to do in conventional programming lan-
guages such as C, C++, or Java™.
Chapter 9, Enough awk to Be Dangerous
This chapter describes the essentials of the
awk language. awk is a powerful lan-
guage in its own right. However, simple, and sometimes, not so simple,
awk pro-
grams can be used with other programs in the software toolbox for easy data
extraction, manipulation, and formatting.