| |
| |
Preface | |
| |
| |
Acknowledgments | |
| |
| |
| |
Introduction to UNIX/Linux Shells | |
| |
| |
What Is UNIX? What Is Linux? A Little History | |
| |
| |
Definition and Function of a Shell | |
| |
| |
History of the Shell | |
| |
| |
System Startup and the Login Shell | |
| |
| |
Processes and the Shell | |
| |
| |
The Environment and Inheritance | |
| |
| |
Executing Commands from Scripts | |
| |
| |
| |
Shell Programming QuickStart | |
| |
| |
Taking a Peek at Shell Scripts | |
| |
| |
Sample Scripts: Comparing the Major Shells | |
| |
| |
The C and TC Shell Syntax and Constructs | |
| |
| |
The Bourne Shell Syntax and Constructs | |
| |
| |
The Korn Shell Constructs | |
| |
| |
The Bash Shell Constructs | |
| |
| |
| |
Regular Expressions and Pattern Matching | |
| |
| |
Regular Expressions | |
| |
| |
Combining Regular Expression Metacharacters | |
| |
| |
4 | |
| |
| |
The grep Command | |
| |
| |
grep Examples with Regular Expressions | |
| |
| |
grep with Options | |
| |
| |
grep with Pipes | |
| |
| |
egrep (Extended grep) | |
| |
| |
fgrep (Fixed grep or Fast grep) | |
| |
| |
Linux and GNU grep | |
| |
| |
GNU Basic grep (grep -G) with Regular Expressions | |
| |
| |
grep -E or egrep (GNU Extended grep) | |
| |
| |
Fixed grep (grep -F and fgrep) | |
| |
| |
Recursive grep (rgrep, grep -R) | |
| |
| |
grep with Options | |
| |
| |
grep with Options (UNIX and GNU) | |
| |
| |
| |
grep Exercise | |
| |
| |
sed, the Streamlined Editor | |
| |
| |
What Is sed? Versions of sed | |
| |
| |
How Does sed Work? Regular Expressions | |
| |
| |
Addressing | |
| |
| |
Commands and Options | |
| |
| |
Error Messages and Exit Status | |
| |
| |
Metacharacters | |
| |
| |
sed Examples | |
| |
| |
sed Scripting | |
| |
| |
| |
sed Exercise | |
| |
| |
| |
The awk Utility | |
| |
| |
What's awk? What's nawk? What's gawk? | |
| |
| |
awk's Format | |
| |
| |
How awk Works | |
| |
| |
Formatting Output | |
| |
| |
awk Commands from Within a File | |
| |
| |
Records and Fields | |
| |
| |
Patterns and Actions | |
| |
| |
Regular Expressions | |
| |
| |
awk Commands in a Script File | |
| |
| |
Review | |
| |
| |
| |
awk Exercise | |
| |
| |
Comparison Expressions | |
| |
| |
Review | |
| |
| |
| |
awk Exercise | |
| |
| |
Variables | |
| |
| |
Redirection and Pipes | |
| |
| |
Pipes | |
| |
| |
Review | |
| |
| |
| |
nawk Exercise | |
| |
| |
Conditional Statements | |
| |
| |
Loops | |
| |
| |
Program Control Statements | |
| |
| |
Arrays | |
| |
| |
awk Built-In Functions | |
| |
| |
Built-In Arithmetic Functions | |
| |
| |
User-Defined Functions (nawk) | |
| |
| |
Review | |
| |
| |
| |
nawk Exercise | |
| |
| |
Odds and Ends | |
| |
| |
| |
nawk Exercise | |
| |
| |
awk Built-In Functions | |
| |
| |
| |
The Interactive Bourne Shell | |
| |
| |
Introduction | |
| |
| |
The Environment | |
| |
| |
The Command Line | |
| |
| |
Shell Metacharacters (Wildcards) | |
| |
| |
Filename Substitution | |
| |
| |
Variables | |
| |
| |
Quoting | |
| |
| |
Command Substitution | |
| |
| |
An Introduction to Functions | |
| |
| |
Standard I/O and Redirection | |
| |
| |
Pipes | |
| |
| |
The here document and Input | |
| |
| |
| |
Programming the Bourne Shell | |
| |
| |
Introduction | |
| |
| |
Reading User Input | |
| |
| |
Arithmetic | |
| |
| |
Positional Parameters and Command-Line Arguments | |
| |
| |
Conditional Constructs and Flow Control | |
| |
| |
Looping Commands | |
| |
| |
Functions | |
| |
| |
Trapping Signals | |
| |
| |
The Command Line | |
| |
| |
Shell Invocation Options | |
| |
| |
| |
Bourne Shell--Getting Started | |
| |
| |
Metacharacters | |
| |
| |
| |
Redirection | |
| |
| |
| |
First Script | |
| |
| |
| |
Command-Line Arguments | |
| |
| |
| |
Getting User Input | |
| |
| |
| |
Conditional Statements | |
| |
| |
| |
Conditionals and File Testing | |
| |
| |
| |
The case Statement | |
| |
| |
| |
Loops | |
| |
| |
| |
Functions | |
| |
| |
| |
The Interactive C and TC Shells | |
| |
| |
Introduction | |
| |
| |
The Environment | |
| |
| |
The C/TC Shell | |