Mastering Unix Shell Scripting

  • 10h 39m
  • Randal K. Michael
  • John Wiley & Sons (US)
  • 2003

This comprehensive book takes you step-by-step through the process of writing shell scripts to solve real-world Unix problems and tasks. Each chapter begins by presenting a typical Unix challenge that you’ll most likely experience at your job. With each challenge, you’ll learn how to identify a specific goal and start the shell script by defining the correct command syntax to solve the problem. You’ll find out how to build the shell script around the commands, filter the commands output to strip out the unneeded data, and add options that give users more flexibility on the command line.

The approach used will teach you how to attack problems logically. It will also empower you to take the basic command syntax and turn it into a shell scripting solution.

Throughout the book, you’ll find end-to-end shell scripts that you can use to automate repetitive tasks and solve real-world system administration problems. These tasks include:

  • Communications such as automated event notification, monitoring processes locally and on remote systems, and automated FTP file transfers
  • Information gathering and monitoring for file systems, paging/swap space, system load, applications, processes, and capturing the system’s configuration
  • Print queue management to keep the printers printing
  • Floating point mathematics in shell scripts using the bc utility

About the Author

Randal K. Michael is a Unix Systems Administrator at Coca-Cola Enterprises, Inc., where he writes shell scripts to address complex monitoring and event notification issues. He has more than 23 years of industry experience and 10 years of experience as a Unix Systems Administrator, working with Solaris, Linux, AIX, and HP-UX.

In this Book

  • Mastering Unix Shell Scripting
  • Introduction
  • Scripting Quick Start and Review
  • Twelve Ways to Process a File Line by Line
  • Automated Event Notification
  • Progress Indicator Using a Series of Dots, a Rotating Line, or a Countdown to Zero
  • File System Monitoring
  • Monitoring Paging and Swap Space
  • Monitoring System Load
  • Process Monitoring and Enabling Preprocess, Startup, and Postprocess Events
  • Monitoring Processes and Applications
  • Creating Pseudo-Random Passwords
  • Monitor for Stale Disk Partitions
  • Automated Hosts Pinging with Notification
  • Taking a System Snapshot
  • Compiling, Installing, Configuring, and Using sudo
  • hgrep Highlighted grep Script
  • Print Queue Hell: Keeping the Printers Printing
  • Automated FTP Stuff
  • Finding "Large" Files
  • Monitoring and Auditing User Key Strokes
  • Turning On/Off SSA Identification Lights
  • Pseudo-Random Number Generation
  • Floating-Point Math and the bc Utility
  • Scripts for Number Base Conversions
  • Menu Program Suitable for Operations Staff
  • Sending Pop-Up Messages from Unix to Windows
SHOW MORE
FREE ACCESS

YOU MIGHT ALSO LIKE

Rating 4.0 of 1 users Rating 4.0 of 1 users (1)
Channel Shell Scripting
Rating 5.0 of 2 users Rating 5.0 of 2 users (2)

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.5 of 698 users Rating 4.5 of 698 users (698)
Rating 4.5 of 642 users Rating 4.5 of 642 users (642)
Rating 4.6 of 183 users Rating 4.6 of 183 users (183)