LINUX & UNIX Shell Programming
Author: David Tansley
Price: $44.95 US
Reviewer: Marjorie Richardson
When beginning to read LINUX & UNIX Shell Programming, I was a bit confused to find I was reading about shell basics and not programming. My conclusion was, Mr. Tansley is writing for the true beginner to UNIX and so is first providing background and command information that will be needed when the user actually begins writing scripts. He is covering the basic or Bourne shell, which is common to all UNIX flavors including Linux, so scripts will be portable. More than once, he emphasizes the fact that his scripts are not the most efficient design, but are easy to understand and reuse. The back of the book states all scripts are available via an FTP site, but then doesn't give an address, and I couldn't find one in the book—strange.
The book is divided into five parts. Not until Part 4 does Mr. Tansley actually begin to talk about programming. He expects the reader to know only how to log in and use a text editor. While this was a bit disappointing for me, it won't be for someone who has not worked with UNIX for as long as I have.
This book needed better editing; the mistakes I found should have been caught. Mr. Tansley has been a UNIX system administrator for some time and clearly knows his subject. But run-on sentences with improper punctuation, extra words, omitted words and misspellings (e.g., dirrectory) make understanding the material harder than it should be. An entire chapter is devoted to the find command, and it contains two serious editing problems. One, when explaining the use of the mtime option on page 25, this statement appears:
Use “-” to specify files that have not been accessed in x number of days. Use “+” for files that have been accessed.
This has the meanings of - and + reversed, as is demonstrated in his printed examples. Two, in his explanation of the exec option, there is this statement:
To use exec you do have to have the “-print” option on.
In general, the explanations are good, though not heavily detailed. The author's style is casual and simple, making it easy to read and understand. He discusses many useful things such as find, cron, grep, wild cards, pipes, input/output, awk, sed, environment variables and many shell commands. All this is a prelude to getting down to the serious business of scripting.
Part 4 covers shell scripting, and Part 5 covers better shell scripting. Part 4 begins with explanations of how to use test and expr to determine file status and string evaluation—a very good place to start, indeed. Then he moves on to discuss flow control structures (e.g., if-then-else, for, while and case), exit status, creation of menus and printing. Examples are simple and to the point, demonstrating the current topic quite aptly. A good example is how to make your script interactive; that is, accept input from the keyboard rather than run in the background. Also in Part 4, he covers passing parameters, creating screen input, debugging and built-in commands.
Part 5 goes on to advanced scripting, with more details on “here” files and how-tos for run-level and cgi scripts. He includes a goodly sample of his own administration scripts which are quite helpful. There is much useful information in these two sections to help the beginning scripter. I did not find technical errors in these parts as I did in the beginning.
LINUX & UNIX Shell Programming is a good introduction to the shell as well as scripting. With a good editor, it will be even better in a second edition. Right now, I hesitate to recommend it to complete beginners, even though they are its target audience; however, for someone who has used UNIX for a short while and has the ability to sort out any confusions caused by typos, it could provide a useful reference.
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!
|Fancy Tricks for Changing Numeric Base||May 29, 2016|
|Working with Command Arguments||May 28, 2016|
|Secure Desktops with Qubes: Installation||May 28, 2016|
|CentOS 6.8 Released||May 27, 2016|
|Secure Desktops with Qubes: Introduction||May 27, 2016|
|Chris Birchall's Re-Engineering Legacy Software (Manning Publications)||May 26, 2016|
- Tips for Optimizing Linux Memory Usage
- Working with Command Arguments
- Secure Desktops with Qubes: Introduction
- Secure Desktops with Qubes: Installation
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Fancy Tricks for Changing Numeric Base
- CentOS 6.8 Released
- Linux Mint 18
- The Italian Army Switches to LibreOffice
- Chris Birchall's Re-Engineering Legacy Software (Manning Publications)
Until recently, IBM’s Power Platform was looked upon as being the system that hosted IBM’s flavor of UNIX and proprietary operating system called IBM i. These servers often are found in medium-size businesses running ERP, CRM and financials for on-premise customers. By enabling the Power platform to run the Linux OS, IBM now has positioned Power to be the platform of choice for those already running Linux that are facing scalability issues, especially customers looking at analytics, big data or cloud computing.
￼Running Linux on IBM’s Power hardware offers some obvious benefits, including improved processing speed and memory bandwidth, inherent security, and simpler deployment and management. But if you look beyond the impressive architecture, you’ll also find an open ecosystem that has given rise to a strong, innovative community, as well as an inventory of system and network management applications that really help leverage the benefits offered by running Linux on Power.Get the Guide