Bash, Bourne, and Korn Shell Scripting for Programmers, System Administrators, and UNIX Gurus
Randal K. Michael
Unix#
Shell_Scripting#
Bash#
Bourne#
System_Administrators#
FTP#
SOX#
Learn to create shell scripts to solve real-world UNIX problems
Get ready to take on the UNIX world! UNIX expert Randal K. Michael guides you through every detail of writing shell scripts to automate specific tasks. Each chapter begins with a typical, everyday UNIX challenge, and then shows you how to take basic syntax and turn it into a shell scripting solution. Throughout the book, you'll also find complete shell scripts plus detailed descriptions of each part. You'll be able to modify this information to build tools that monitor for specific system events and situations, building the skills to solve real-world system administration problems.
Contents
Part I: The Basics of Shell Scripting
Chapter 1: Scripting Quick Start and Review
Chapter 2: 24 Ways to Process a File Line-by- Line
Chapter 3: Automated Event Notification
Chapter 4: Progress Indicators Using a Series of Dots, a Rotating Line, or Elapsed Time
Part II: Scripts for Programmers, Testers, and Analysts
Chapter 5: Working with Record Files
Chapter 6: Automated FTP Stuff
Chapter 7: Using rsync to Efficiently Replicate Data
Chapter 8: Automating Interact ive Programs with Expect and Autoexpect
Chapter 9: Finding Large Files and Files of a Specific Type
Chapter 10: Process Monitoring and Enabling Pre-Processing, Startup, and Post-Processing Events
Chapter 11: Pseudo -Random Number and Data Generation
Chapter 12: Creating Pseudo -Random Passwords
Chapter 13: Floating-Point Math and the be Utility
Chapter 14: Number Base Conversions
Chapter 15: hgrep: Highlighted grep Script
Chapter 16: Monitoring Processes and Applications
Part Ill: Scripts for Systems Administrators
Chapter 17: Filesystem Monitoring
Chapter 18: Monitoring Paging and Swap Space
Chapter 19: Monitoring System Load
Chapter 20: Monitoring for Stale Disk Partitions (AIX-Specific)
Chapter 21: Turning On/ Off SSA Identification Lights
Chapter 22: Automated Hosts Pinging with Notification of Failure
Chapter 23: Creating a System-Configuration Snapshot
Chapter 24: Compiling, Installing, Configuring, and Using sudo
Chapter 25: Print-Queue Hell: Keeping the Printers Printing
Chapter 26: Those Pesky Sarbanes-Oxley (SOX) Audits
Chapter 27: Using Dirvish with rsync to Create Snapshot-Type Backups
Chapter 28: Monitoring and Auditing User Keystrokes
Randal K. Michael is a UNIX Systems Administrator working as a contract consultant. He teaches UNIX shell scripting in corporate settings, where he writes shell scripts to address a variety of problems and tasks ranging from monitoring systems to replicating large databases. He has more than 30 years of experience in the industry and 15 years of experience as a UNIX Systems Administrator, working on AIX, HP-UX, Linux, OpenBSD, and Solaris.