Mastering UNIX Shell Scripting by Randy Michael
This Wiley Publishing tome is big (more than 650 pages), useful and very complete. Be warned, however, that its scope is limited to system administration. The purpose of the book is to solve “real world...problems for those who have to automate these often complex and repetitive tasks”. Little information is directly employable for end-user tasks, such as printing booklets, mirroring Web sites or searching through e-mail.
The author has a lot of experience with shell scripting, and it shows. The scripts to solve each problem are well written and discussed line by line. For each, a preamble gives the big picture or introduces some command that is used in the rest of the chapter.
Anyone interested in scripting for maximum portability or ease of maintenance can learn a lot from this book. Everything needed to use the same script with Linux and all varieties of UNIX is present: Linux, Solaris, AIX and HP-UX have one subsection each.
The first chapter is a quick tutorial of shell scripting and a summary of all the techniques discussed later. The second one goes head first into deep scripting mode, setting the pace for the whole book. It offers 12 different ways to read a file line by line, including benchmarks to find the fastest one.
The most arcane shell commands and options are explained with plenty of examples. “Here” documents, a way to feed input to a script or command within the script itself, are explained thoroughly. Readers learn more than they could imagine about traps, typeset, getopts and other techniques for managing command-line arguments.
System monitoring receives the most coverage: several chapters explain how to detect and report problems in processes, disk space, memory and CPU usage.
Other important administration activities have their own sections. The author moves with ease from system snapshots to print queues, automated FTP and building sudo from source. Several methods to add menus and progress bars to shell scripts are explained. Floating-point math, number conversion and generation of random passwords and numbers also are covered. The volume ends with 45 pages devoted to sending pop-up messages from UNIX to Microsoft OSes. All scripts are available for download at the Wiley Web site area devoted to the book.
Articles about Digital Rights and more at http://stop.zona-m.net CV, talks and bio at http://mfioretti.com
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- The Humble Hacker?
- Server Hardening
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- EnterpriseDB's EDB Postgres Advanced Server and EDB Postgres Enterprise Manager
- The Death of RoboVM
- The US Government and Open-Source Software
- Open-Source Project Secretly Funded by CIA
- ACI Worldwide's UP Retail Payments
- Varnish Software's Hitch
- Tech Tip: Really Simple HTTP Server with Python
In modern computer systems, privacy and security are mandatory. However, connections from the outside over public networks automatically imply risks. One easily available solution to avoid eavesdroppers’ attempts is SSH. But, its wide adoption during the past 21 years has made it a target for attackers, so hardening your system properly is a must.
Additionally, in highly regulated markets, you must comply with specific operational requirements, proving that you conform to standards and even that you have included new mandatory authentication methods, such as two-factor authentication. In this ebook, I discuss SSH and how to configure and manage it to guarantee that your network is safe, your data is secure and that you comply with relevant regulations.Get the Guide