Mastering Unix Shell Scripting: Bash, Bourne, and Korn Shell Scripting for Programmers, System Administrators, and UNIX Gurus (Google eBook)

Front Cover
John Wiley & Sons, Sep 14, 2011 - Computers - 1032 pages
2 Reviews
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, then shows you how to take basic syntax and turn it into a shell scripting solution. Covering Bash, Bourne, and Korn shell scripting, this updated edition provides complete shell scripts plus detailed descriptions of each part. UNIX programmers and system administrators can tailor these to build tools that monitor for specific system events and situations, building solid UNIX shell scripting skills to solve real-world system administration problems.
  

What people are saying - Write a review

Review: Mastering UNIX Shell Scripting: Bash, Bourne, and Korn Shell Scripting for Programmers, System Administrators, and Unix Gurus

User Review  - tnicholson Nicholson - Goodreads

Almost everyone says that they can write shell scripts. Well they're doing it wrong most of the time. This book can help fix that. Read full review

Contents

Scripting Quick Start and Review
3
Using awk on Solaris
19
Setting Traps
25
Output Control
32
Using Command Output in a Loop
40
Creating a PseudoRandom Number
47
whilelineoutfileFDOUT
90
whileLINElineFDINANDOUT
96
Monitoring Processes and Applications
527
Part Three Scripts for Systems Administrators
553
Monitoring Paging and Swap Space
603
Monitoring System Load
641
Linux
645
Syntax for vmstat
651
Other Options to Consider
674
Log Files
695

What about Using Command Input Instead of File Input?
128
Progress Indicators Using a Series of Dots a Rotating
143
Part Two Scripts for Programmers Testers and Analysts
157
Working with Strings
171
Other Things to Consider
183
Using rsync to Efficiently Replicate Data
219
Automating Interactive Programs with Expect
291
Expects Version of a case Statement
306
Expects Version of an if then else Loop
313
Summary
323
Process Monitoring and Enabling PreProcessing Startup
335
PseudoRandom Number and Data Generation
369
Creating a File Filled with Random Characters
392
Other Things to Consider
399
FloatingPoint Math and the bc Utility
433
Number Base Conversions
475
Highlighted grep Script
515
Automated Hosts Pinging with Notification of Failure
723
Creating a SystemConfiguration Snapshot
741
Compiling Installing Configuring and Using sudo
777
Compiling sudo
779
Configuring sudo
790
Using sudo
797
The sudo Log File
806
Those Pesky SarbanesOxley SOX Audits
851
Using Dirvish with rsync to Create SnapshotType Backups
867
Installing Dirvish
869
Using Dirvish on the Command Line
875
Putting It All Together
893
Using the dirvishctrl Shell Script
918
Summary
933
Appendix A Whats on the Web Site
955
Index
977
Copyright

Common terms and phrases

About the author (2011)

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.

Bibliographic information