Mastering Unix Shell Scripting: BASH, KORN Shell, and KORN 93 Shell Scripting for Programmers, System Administrators and UNIX Guru's, Second Edition
- 14h 32m
- Randall K. Michael
- John Wiley & Sons (US)
- 2008
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.
- Make the most of Bash, Bourne, and Korn shells
- Execute the proper commands for eachUNIX flavor
- Define the correct command syntax to meet a specific shell scripting goal
- Filter the commands' output to strip out unneeded data
- Build options into the shell script to give the end user more flexibility on the command line
- Replicate data using rsync
- Create snapshot-style backups using Dirvish
- Work with records files to parse data
- Prepare for government audits using specific commands
About the Author
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 complex 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.
In this Book
-
Scripting Quick Start and Review
-
24 Ways to Process a File Line-by-Line
-
Automated Event Notification
-
Progress Indicators Using a Series of Dots, a Rotating Line, or Elapsed Time
-
Working with Record Files
-
Automated FTP Stuff
-
Using rsync to Efficiently Replicate Data
-
Automating Interactive Programs with Expect and Autoexpect
-
Finding Large Files and Files of a Specific Type
-
Process Monitoring and Enabling Pre-Processing, Startup, and Post-Processing Events
-
Pseudo-Random Number and Data Generation
-
Creating Pseudo-Random Passwords
-
Floating-Point Math and the bc Utility
-
Number Base Conversions
-
hgrep: Highlighted grep Script
-
Monitoring Processes and Applications
-
Filesystem Monitoring
-
Monitoring Paging and Swap Space
-
Monitoring System Load
-
Monitoring for Stale Disk Partitions (AIX‐Specific)
-
Turning On/Off SSA Identification Lights
-
Automated Hosts Pinging with Notification of Failure
-
Creating a System-Configuration Snapshot
-
Compiling, Installing, Configuring, and Using sudo
-
Print-Queue Hell: Keeping the Printers Printing
-
Those Pesky Sarbanes-Oxley (SOX) Audits
-
Using Dirvish with rsync to Create Snapshot-Type Backups
-
Monitoring and Auditing User Keystrokes