Classic Shell Scripting
Hidden Commands that Unlock the Power of Unix
Publisher: O'Reilly Media
Release Date: December 2008
Pages: 560
Read on Safari with a 10-day trial
Start your free trial now Buy on AmazonWhere’s the cart? Now you can get everything on Safari. To purchase books, visit Amazon or your favorite retailer. Questions? See our FAQ or contact customer service:
1-800-889-8969 / 707-827-7019
support@oreilly.com
Table of Contents
-
Chapter 1 Background
-
Unix History
-
Software Tools Principles
-
Summary
-
-
Chapter 2 Getting Started
-
Scripting Languages Versus Compiled Languages
-
Why Use a Shell Script?
-
A Simple Script
-
Self-Contained Scripts: The #! First Line
-
Basic Shell Constructs
-
Accessing Shell Script Arguments
-
Simple Execution Tracing
-
Internationalization and Localization
-
Summary
-
-
Chapter 3 Searching and Substitutions
-
Searching for Text
-
Regular Expressions
-
Working with Fields
-
Summary
-
-
Chapter 4 Text Processing Tools
-
Sorting Text
-
Removing Duplicates
-
Reformatting Paragraphs
-
Counting Lines, Words, and Characters
-
Printing
-
Extracting the First and Last Lines
-
Summary
-
-
Chapter 5 Pipelines Can Do Amazing Things
-
Extracting Data from Structured Text Files
-
Structured Data for the Web
-
Cheating at Word Puzzles
-
Word Lists
-
Tag Lists
-
Summary
-
-
Chapter 6 Variables, Making Decisions, and Repeating Actions
-
Variables and Arithmetic
-
Exit Statuses
-
The case Statement
-
Looping
-
Functions
-
Summary
-
-
Chapter 7 Input and Output, Files, and Command Evaluation
-
Standard Input, Output, and Error
-
Reading Lines with read
-
More About Redirections
-
The Full Story on printf
-
Tilde Expansion and Wildcards
-
Command Substitution
-
Quoting
-
Evaluation Order and eval
-
Built-in Commands
-
Summary
-
-
Chapter 8 Production Scripts
-
Path Searching
-
Automating Software Builds
-
Summary
-
-
Chapter 9 Enough awk to Be Dangerous
-
The awk Command Line
-
The awk Programming Model
-
Program Elements
-
Records and Fields
-
Patterns and Actions
-
One-Line Programs in awk
-
Statements
-
User-Defined Functions
-
String Functions
-
Numeric Functions
-
Summary
-
-
Chapter 10 Working with Files
-
Listing Files
-
Updating Modification Times with touch
-
Creating and Using Temporary Files
-
Finding Files
-
Running Commands: xargs
-
Filesystem Space Information
-
Comparing Files
-
Summary
-
-
Chapter 11 Extended Example: Merging User Databases
-
The Problem
-
The Password Files
-
Merging Password Files
-
Changing File Ownership
-
Other Real-World Issues
-
Summary
-
-
Chapter 12 Spellchecking
-
The spell Program
-
The Original Unix Spellchecking Prototype
-
Improving ispell and aspell
-
A Spellchecker in awk
-
Summary
-
-
Chapter 13 Processes
-
Process Creation
-
Process Listing
-
Process Control and Deletion
-
Process System-Call Tracing
-
Process Accounting
-
Delayed Scheduling of Processes
-
The /proc Filesystem
-
Summary
-
-
Chapter 14 Shell Portability Issues and Extensions
-
Gotchas
-
The bash shopt Command
-
Common Extensions
-
Download Information
-
Other Extended Bourne-Style Shells
-
Shell Versions
-
Shell Initialization and Termination
-
Summary
-
-
Chapter 15 Secure Shell Scripts: Getting Started
-
Tips for Secure Shell Scripts
-
Restricted Shell
-
Trojan Horses
-
Setuid Shell Scripts: A Bad Idea
-
ksh93 and Privileged Mode
-
Summary
-
-
Chapter 16 Bibliography
-
Unix Programmer's Manuals
-
Programming with the Unix Mindset
-
Awk and Shell
-
Standards
-
Security and Cryptography
-
Unix Internals
-
O'Reilly Books
-
Miscellaneous Books
-
-
Colophon