Classic Shell Scripting - Arnold Robbins [1]
9.7.3. Iterative Execution
9.7.4. Array Membership Testing
9.7.5. Other Control Flow Statements
9.7.6. User-Controlled Input
9.7.7. Output Redirection
9.7.8. Running External Programs
9.8. User-Defined Functions
9.9. String Functions
9.9.1. Substring Extraction
9.9.2. Lettercase Conversion
9.9.3. String Searching
9.9.4. String Matching
9.9.5. String Substitution
9.9.6. String Splitting
9.9.7. String Reconstruction
9.9.8. String Formatting
9.10. Numeric Functions
9.11. Summary
10. Working with Files
10.1. Listing Files
10.1.1. Long File Listings
10.1.2. Listing File Metadata
10.2. Updating Modification Times with touch
10.3. Creating and Using Temporary Files
10.3.1. The $$ Variable
10.3.2. The mktemp Program
10.3.3. The /dev/random and /dev/urandom Special Files
10.4. Finding Files
10.4.1. Finding Files Quickly
10.4.2. Finding Where Commands Are Stored
10.4.3. The find Command
10.4.4. Finding Problem Files
10.5. Running Commands: xargs
10.6. Filesystem Space Information
10.6.1. The df Command
10.6.2. The du Command
10.7. Comparing Files
10.7.1. The cmp and diff Utilities
10.7.2. The patch Utility
10.7.3. File Checksum Matching
10.7.4. Digital Signature Verification
10.8. Summary
11. Extended Example: Merging User Databases
11.1. The Problem
11.2. The Password Files
11.3. Merging Password Files
11.3.1. Separating Users by Manageability
11.3.2. Managing UIDs
11.3.3. Creating User-Old UID-New UID Triples
11.4. Changing File Ownership
11.5. Other Real-World Issues
11.6. Summary
12. Spellchecking
12.1. The spell Program
12.2. The Original Unix Spellchecking Prototype
12.3. Improving ispell and aspell
12.3.1. Private Spelling Dictionaries
12.3.2. ispell and aspell
12.4. A Spellchecker in awk
12.4.1. Introductory Comments
12.4.2. Main Body
12.4.3. initialize( )
12.4.4. get_dictionaries( )
12.4.5. scan_options( )
12.4.6. load_dictionaries( )
12.4.7. load_suffixes( )
12.4.8. order_suffixes( )
12.4.9. spell_check_line( )
12.4.10. spell_check_word( )
12.4.11. strip_suffixes( )
12.4.12. report_exceptions( )
12.4.13. Retrospective on Our Spellchecker
12.4.14. Efficiency of awk Programs
12.5. Summary
13. Processes
13.1. Process Creation
13.2. Process Listing
13.3. Process Control and Deletion
13.3.1. Deleting Processes
13.3.2. Trapping Process Signals
13.4. Process System-Call Tracing
13.5. Process Accounting
13.6. Delayed Scheduling of Processes
13.6.1. sleep: Delay Awhile
13.6.2. at: Delay Until Specified Time
13.6.3. batch: Delay for Resource Control
13.6.4. crontab: Rerun at Specified Times
13.7. The /proc Filesystem
13.8. Summary
14. Shell Portability Issues and Extensions
14.1. Gotchas
14.2. The bash shopt Command
14.3. Common Extensions
14.3.1. The select Loop
14.3.2. Extended Test Facility
14.3.3. Extended Pattern Matching
14.3.4. Brace Expansion
14.3.5. Process Substitution
14.3.6. Indexed Arrays
14.3.7. Miscellaneous Extensions
14.4. Download Information
14.4.1. bash
14.4.2. ksh93
14.5. Other Extended Bourne-Style Shells
14.6. Shell Versions
14.7. Shell Initialization and Termination
14.7.1. Bourne Shell (sh) Startup
14.7.2. Korn Shell Startup
14.7.3. Bourne-Again Shell Startup and Termination
14.7.4. Z-Shell Startup and Termination
14.8. Summary
15. Secure Shell Scripts: Getting Started
15.1. Tips for Secure Shell Scripts
15.2. Restricted Shell
15.3. Trojan Horses
15.4. Setuid Shell Scripts: A Bad Idea
15.5. ksh93 and Privileged Mode
15.6. Summary
A. Writing Manual Pages
A.1. Manual Pages for pathfind
A.2. Manual-Page Syntax Checking
A.3. Manual-Page Format Conversion
A.4. Manual-Page Installation
B. Files and Filesystems
B.1. What Is a File?
B.2. How Are Files Named?
B.3. What's in a Unix File?
B.4. The Unix Hierarchical Filesystem
B.4.1. Filesystem Structure
B.4.2. Layered Filesystems
B.4.3. Filesystem Implementation Overview
B.4.4. Devices as Unix Files
B.5. How Big Can Unix Files Be?
B.6. Unix File Attributes
B.6.1. File Ownership and Permissions