| Foreword | p. ix |
| Preface | p. xi |
| Background | p. 1 |
| Unix History | p. 1 |
| Software Tools Principles | p. 4 |
| Summary | p. 6 |
| Getting Started | p. 8 |
| Scripting Languages Versus Compiled Languages | p. 8 |
| Why Use a Shell Script? | p. 9 |
| A Simple Script | p. 9 |
| Self-Contained Scripts: The #! First Line | p. 10 |
| Basic Shell Constructs | p. 12 |
| Accessing Shell Script Arguments | p. 23 |
| Simple Execution Tracing | p. 24 |
| Internationalization and Localization | p. 25 |
| Summary | p. 28 |
| Searching and Substitutions | p. 30 |
| Searching for Text | p. 30 |
| Regular Expressions | p. 31 |
| Working with Fields | p. 56 |
| Summary | p. 65 |
| Text Processing Tools | p. 67 |
| Sorting Text | p. 67 |
| Removing Duplicates | p. 75 |
| Reformatting Paragraphs | p. 76 |
| Counting Lines, Words, and Characters | p. 77 |
| Printing | p. 78 |
| Extracting the First and Last Lines | p. 83 |
| Summary | p. 86 |
| Pipelines Can Do Amazing Things | p. 87 |
| Extracting Data from Structured Text Files | p. 87 |
| Structured Data for the Web | p. 94 |
| Cheating at Word Puzzles | p. 100 |
| Word Lists | p. 102 |
| Tag Lists | p. 105 |
| Summary | p. 107 |
| Variables, Making Decisions, and Repeating Actions | p. 109 |
| Variables and Arithmetic | p. 109 |
| Exit Statuses | p. 120 |
| The case Statement | p. 129 |
| Looping | p. 130 |
| Functions | p. 135 |
| Summary | p. 138 |
| Input and Output, Files, and Command Evaluation | p. 140 |
| Standard Input, Output, and Error | p. 140 |
| Reading Lines with read | p. 140 |
| More About Redirections | p. 143 |
| The Full Story on printf | p. 147 |
| Tilde Expansion and Wildcards | p. 152 |
| Command Substitution | p. 155 |
| Quoting | p. 161 |
| Evaluation Order and eval | p. 162 |
| Built-in Commands | p. 168 |
| Summary | p. 175 |
| Production Scripts | p. 177 |
| Path Searching | p. 177 |
| Automating Software Builds | p. 192 |
| Summary | p. 222 |
| Enough awk to Be Dangerous | p. 223 |
| The awk Command Line | p. 224 |
| The awk Programming Model | p. 225 |
| Program Elements | p. 226 |
| Records and Fields | p. 236 |
| Patterns and Actions | p. 238 |
| One-Line Programs in awk | p. 240 |
| Statements | p. 244 |
| User-Defined Functions | p. 252 |
| String Functions | p. 255 |
| Numeric Functions | p. 264 |
| Summary | p. 266 |
| Working with Files | p. 267 |
| Listing Files | p. 267 |
| Updating Modification Times with touch | p. 273 |
| Creating and Using Temporary Files | p. 274 |
| Finding Files | p. 279 |
| Running Commands: xargs | p. 293 |
| Filesystem Space Information | p. 295 |
| Comparing Files | p. 299 |
| Summary | p. 307 |
| Extend Example: Merging User Databases | p. 308 |
| The Problem | p. 308 |
| The Password Files | p. 309 |
| Merging Password Files | p. 310 |
| Changing File Ownership | p. 317 |
| Other Real-World Issues | p. 321 |
| Summary | p. 323 |
| Spellchecking | p. 325 |
| The spell Program | p. 325 |
| The Original Unix Spellchecking Prototype | p. 326 |
| Improving ispell and aspell | p. 327 |
| A Spellchecker in awk | p. 331 |
| Summary | p. 350 |
| Processes | p. 352 |
| Process Creation | p. 353 |
| Process Listing | p. 354 |
| Process Control and Deletion | p. 360 |
| Process System-Call Tracing | p. 368 |
| Process Accounting | p. 372 |
| Delayed Scheduling of Processes | p. 373 |
| The /proc Filesystem | p. 378 |
| Summary | p. 379 |
| Shell Portability Issues and Extensions | p. 381 |
| Gotchas | p. 381 |
| The bash shopt Command | p. 385 |
| Common Extensions | p. 389 |
| Download Information | p. 402 |
| Other Extended Bourne-Style Shells | p. 405 |
| Shell Versions | p. 405 |
| Shell Initialization and Termination | p. 406 |
| Summary | p. 412 |
| Secure Shell Scripts: Getting Started | p. 413 |
| Tips for Secure Shell Scripts | p. 413 |
| Restricted Shell | p. 416 |
| Trojan Horses | p. 418 |
| Setuid Shell Scripts: A Bad Idea | p. 419 |
| ksh93 and Privileged Mode | p. 421 |
| Summary | p. 422 |
| Writing Manual Pages | p. 423 |
| Files and Filesystems | p. 437 |
| Important Unix Commands | p. 473 |
| Bibliography | p. 478 |
| Glossary | p. 484 |
| Index | p. 509 |
| Table of Contents provided by Ingram. All Rights Reserved. |