Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Shell scripting recipes: a problem-solution approach (2nd ed.)
Varma J., Johnson C., Apress, New York, NY, 2015. 380 pp. Type: Book (978-1-484202-21-0)
Date Reviewed: Mar 31 2016

Having no introduction or preface, this book does not make a good first impression. The publisher’s book webpage [1] says that the book is “for anyone who has the basic knowledge of what shell scripting is and wants to learn how to use it properly,” and that “all you need is basic knowledge of what shell scripting is.” Not quite: see below.

Chapter 1 presents a very quick overview of some Unix commands and the scripts that will be used in the rest of the book. The pace is cursory and very rapid; for example, regular expressions are given one page.

Chapter 17, the last chapter in the book, shows how to set up and manage a script development environment. This chapter is interesting and useful (I would have placed it very early in the book). Chapters 2 through 16 contain a variety of shell scripts, some of them clearly related to system administration, which is expected, but others related only distantly or not at all. Scripts dealing with things such as manipulating filenames containing blanks or other nonstandard characters, or filenames from foreign operating systems, pathnames, directories, dates, archives, and network addresses would be of interest to both system administrators and to individuals who manage their own systems. Scripts dealing with things such as word frequencies, anagrams, word matches, and so forth may be interesting to individuals, such as one of the authors, who deal with crosswords and word games on a regular basis, but less so to system administrators. Scripts dealing with numeric functions (things such as computing squares, cubes, nearest integer, averages, means, standard deviations, and a command-line calculator) are perhaps best left for a regular programming language. Other scripts are hard to categorize: things such as managing screen properties from the command line stopped being of interest to me after DOS. Miscellaneous scripts for creating or manipulating Hypertext Markup Language (HTML) files, rolling a set of dice, printing lines in random order, and more simply left me cold. If I needed that sort of thing, it’s unlikely I would want to do that through a shell script. Although the challenge may be enjoyable, proving that something can be done with the shell does not mean that it is the best way to do it.

Each script in the book is presented in a consistent format. A section entitled “How It Works” describes the purpose of the script and shows examples of how to use it. Then comes the script source code. Some scripts have an additional section entitled “Notes.” Scripts are left to speak for themselves; there is no explanation of how they are designed or how they accomplish their tasks. In order to read the code with any degree of comprehension, the reader will need a good deal of experience with Unix commands and shell scripts, somewhat more than the basic knowledge mentioned in the book’s website or included in chapter 1.

The authors are careful to write scripts that are based on POSIX-approved features and commands. They have obviously attempted to make scripts portable, without making portability a requirement. The scripts should be able to run with little or no modification on most POSIX-compliant shells. Some scripts are obviously restricted to the Bourne/Bash shell.

The book concludes with a short list of resources. Many entries are missing from the index. The detailed table of contents helps, but does not excuse the shortcomings of the index.

The book would be useful to anyone who might want to use or modify the scripts given here. Readers who would like to enhance their script-writing competence will have ample opportunity to study sophisticated scripts with minimal documentation.

It is definitely a book for self-study; I don’t recommend it for the computer science curriculum.

A final note: Apparently, the only way to download the source code is to purchase an electronic copy of the book.

Reviewer:  Edgar R. Chavez Review #: CR144275 (1606-0374)
1) Varma, J.; Johnson, C. Shell scripting recipes (2nd ed.) website. APress, http://www.apress.com/9781484202210?gtmf=s (03/20/2016).
Bookmark and Share
  Reviewer Selected
Featured Reviewer
 
 
Systems Programs And Utilities (D.4.9 )
 
 
General (D.1.0 )
 
Would you recommend this review?
yes
no
Other reviews under "Systems Programs And Utilities": Date
UNIX utilities: a programmer’s reference
Tare R., McGraw-Hill, Inc., New York, NY, 1987. Type: Book (9789780070628847)
Aug 1 1988
System software: an introduction to systems programming
Beck L., Addison-Wesley Longman Publishing Co., Inc., Boston, MA, 1985. Type: Book (9789780201109504)
Feb 1 1986
Processing variable length abbreviations: some observations
Newman I. Software--Practice & Experience 16(5): 413-423, 1986. Type: Article
Nov 1 1986
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy