Book description
System administrators need libraries of solutions that are ingenious but understandable. They don't want to reinvent the wheel, but they don't want to reinvent filesystem management either! Expert Shell Scripting is the ultimate resource for all working Linux, Unix, and OS X system administrators who would like to have short, succinct, and powerful shell implementations of tricky system scripting tasks.
Automating small to medium system management tasks
Analyzing system data and editing configuration files
Scripting Linux, Unix, and OS X applications using bash, ksh, et al.
Table of contents
- Title Page
- Contents at a Glance
- Contents
- About the Author
- About the Technical Reviewer
- Acknowledgments
- Introduction
-
PART 1: Basic Scripting Techniques
- CHAPTER 1: Shell Script Debugging
- CHAPTER 2: Standard Function Library
- CHAPTER 3: Date and Time Manipulation
- CHAPTER 4: Comparisons and Tests
- CHAPTER 5: Accepting Command-Line Options, Switches, and Parameters
- CHAPTER 6: Testing Variables and Assigning Defaults
- CHAPTER 7: Indirect Reference Variables
- CHAPTER 8: Shell Process Tree
- CHAPTER 9: Data Redirection
- CHAPTER 10: Piping Input to read
-
PART 2: System Interaction and Advanced Techniques
- CHAPTER 11: Math from the Shell
- CHAPTER 12: cron
- CHAPTER 13: Self-Linked Scripts
- CHAPTER 14: Throttling Parallel Processes
- CHAPTER 15: Command-Line Editing and History
- CHAPTER 16: Scripting from the Command Line
- CHAPTER 17: Automating User Input with expect
- CHAPTER 18: User Input Timeout
- CHAPTER 19: Instant Keyboard Response
- CHAPTER 20: Directory Copying
- CHAPTER 21: A Brief Tour of the X Display Environment
- CHAPTER 22: X Navigation Window
- CHAPTER 23: Command-Line E-mail Attachments
-
CHAPTER 24: Text-Processing One-Liners
- Displaying Specific Fields
- Specifying the Field Separator
- Simple Pattern-Matching
- Matching Fields Against Several Values
- Determining the Number of Fields
- Determining the Last Field
- Determining the Second-to-Last Field
- Passing Variables to awk
- Using a Variable Passed to awk in a Condition
- Displaying a Range of Fields (Main Method)
- Displaying a Range of Fields (Alternate Method)
- Determining the Length of a String Using awk
- Determining the Length of a String Using expr
- Displaying a Substring with awk
- Displaying a Substring with expr
- Conducting Simple Search and Replace with sed
- Disregarding Blank and Commented Lines from a File
- Conducting Dual Search and Replace with sed
- Filtering Lines with sed
- Searching for Multiple Strings with egrep
- A Clean Method of Searching the Process Table
- Summing Columns Using awk
- Generating Random Numbers Using awk
- Generating Random Numbers from the Shell
- Displaying Character-Based Fields with sed
- Escaping Special Characters
- Returning Trailing Lines from a Pattern Match Using grep
- Returning Preceding Lines to a Pattern Match Using grep
- CHAPTER 25: Editing Files in Place
- CHAPTER 26: Evaluating Variables in a Flat File
- CHAPTER 27: Read Piped Input
- CHAPTER 28: Free-Format Output Using cat
- CHAPTER 29: Automating Interactive Processes
-
PART 3: Useful Scripts
- CHAPTER 30: Automating E-mail with procmail
- CHAPTER 31: Process-Management Monitor
- CHAPTER 32: Managing File Counts
- CHAPTER 33: Processes Running from inittab
- CHAPTER 34: Automatic RCS
- CHAPTER 35: Colorful /proc Reporting
- CHAPTER 36: Password-Aging Notification
- CHAPTER 37: A Pseudo–shadow File
- CHAPTER 38: Linux Gold-System Build
- CHAPTER 39: System Snapshots
- CHAPTER 40: Removing Large Files and Log Rolling
- CHAPTER 41: Core Finder
- CHAPTER 42: Network Adapter Failover
- APPENDIX A: Test Switches
- APPENDIX B: Special Parameters
- APPENDIX C: Other Shell-Scripting Resources
- INDEX
Product information
- Title: Expert Shell Scripting
- Author(s):
- Release date: December 2008
- Publisher(s): Apress
- ISBN: 9781430218418
You might also like
book
Shell Scripting: Expert Recipes for Linux, Bash, and More
A compendium of shell scripting recipes that can immediately be used, adjusted, and applied The shell …
video
Robust Shell Scripting
Doing any kind of serious work on a UNIX or Linux system requires a confident understanding …
book
Learning Linux Shell Scripting
Unleash the power of shell scripts to solve real-world problems by breaking through the practice of …
book
Learning Linux Shell Scripting - Second Edition
Break through the practice of writing tedious code with shell scripts About This Book Learn to …