-
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
- Title:
- Classic Shell Scripting
- By:
- Arnold Robbins, Nelson H. F. Beebe
- Publisher:
- O'Reilly Media
- Formats:
-
- Ebook
- Safari Books Online
- Print Release:
- May 2005
- Ebook Release:
- December 2008
- Pages:
- 560
- Print ISBN:
- 978-0-596-00595-5
- | ISBN 10:
- 0-596-00595-4
- Ebook ISBN:
- 978-0-596-15949-8
- | ISBN 10:
- 0-596-15949-8
Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects.
The animal on the cover of Classic Shell Scripting is the knobby geometric or African tent tortoise (Psammobates tentorius). The genus Psammobates literally means "sand-loving," so it isn't surprising that the tent tortoise is found only in the steppes and outer desert zones of southern Africa. All species in this genus are small, ranging in size from five to ten inches, and have yellow radiating marks on their carapace. The tent tortoise is particularly striking, with arched scutes that look like tents.
Tortoises are known for their long lifespan, and turtles and tortoises are also among the most ancient animal species alive today. They existed in the era of dinosaurs some 200 million years ago. All tortoises are temperature dependent, which means they eat only when the temperature is not too extreme. During hot summer and cold winter days, tortoises go into a torpor and stop feeding altogether. In the spring, the tent tortoise's diet consists of succulent, fibrous plants and grasses.
In captivity, this species may hibernate from June to September, and will sometimes dig itself into a burrow and remain there for quite a long time. All "sand-loving" tortoises are very difficult to maintain in captivity. They are highly susceptible to shell disease and respiratory problems brought on by cold or damp environments, so their enclosures must be extremely sunny and dry. The popularity of these species among tortoise enthusiasts and commercial traders, along with the continued destruction of their natural habitat, has made the African tent tortoise among the top twenty-five most endangered tortoises in the world.
Adam Witwer was the production editor and Audrey Doyle was the copyeditor for Classic Shell Scripting. Ann Schirmer proofread the text. Colleen Gorman and Claire Cloutier provided quality control. Angela Howard wrote the index.
Emma Colby designed the cover of this book, based on a series design by Edie Freedman. The cover image is a 19th-century engraving from the Dover Pictorial Archive. Karen Montgomery produced the cover layout with Adobe InDesign CS using Adobe's ITC Garamond font.
David Futato designed the interior layout. This book was converted by Keith Fahlgren to FrameMaker 5.5.6 with a format conversion tool created by Erik Ray, Jason McIntosh, Neil Walls, and Mike Sierra that uses Perl and XML technologies. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed. The illustrations that appear in the book were produced by Robert Romano, Jessamyn Read, and Lesley Borash using Macromedia FreeHand MX and Adobe Photoshop CS. The tip and warning icons were drawn by Christopher Bing. This colophon was written by Lydia Onofrei.The production editors for
