Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Wicked cool shell scripts : 101 scripts for Linux, OS X, and UNIX systems (2nd ed.)
Taylor D., Perry B., No Starch Press, San Francisco, CA, 2016. 368 pp. Type: Book (978-1-593276-02-7)
Date Reviewed: Mar 23 2017

This is the second edition of a book originally published in 2004, and some new material has been added to address needs (like cloud storage access) that have emerged since that time. The authors observe that if you are using any kind of Unix-like operating system, then you will by default be using the Bash shell. That is not actually the case; you won’t find it on NetBSD, OpenBSD, or FreeBSD machines, and you probably won’t find it on Solaris machines. The good news is that you can install it on such machines without too much difficulty. And, as the authors show in Appendix A, you can install it on recent versions of Windows 10.

An introductory chapter illustrates how terminal applications can be opened in OS X and Linux machines, and how simple commands can be executed therein. Instructions are provided for locating and modifying login files to adjust script paths. A couple of simple scripts are presented, and readers are shown how to set their file permissions so that they are executable.

There are 15 subsequent chapters with titles (according to content) like: “Improving on User Commands,” “System Administration,” “Web and Internet Users,” and “Working with the Cloud.” Each chapter contains a number of scripts, and each script listing is accompanied by notes about its operation and examples showing its output.

One of the simplest scripts is echon, which can be used anywhere in place of echo, where trailing blank suppression is required; it gets around the issues that arise with the different versions of echo found in different places.

Most of us have inadvertently used the rm command on a file that we still need. The authors show how an alias can be created so that a custom script is invoked in place of rm; this prepends the removal candidate’s filename with a date string and then moves it to an archive directory. If you dislike the way this script logs its activities to a file, check out the “Hacking the Script” notes that accompany every script in the book that explain how to instead use the logger facility.

An interesting script called bestcompress simultaneously compresses a file using three different utilities and then retains the best result. It provides a good illustration of the wait and trap commands.

Some scripts provide easy mechanisms for acquiring information from web pages. One of these is called moviedata. It is able to access the Internet Movie Database (IMDb) and show the database number of movies whose titles match a designated string; if executed with a database number as a parameter, it shows a short synopsis of the referenced movie.

The administration chapters contain some wrapper scripts for standard user management, archive, and logrotate commands, and you may be able to simplify some of your operations by customizing them for your sites. An interesting script called sftpsync builds a list of files that have changed since its last invocation, and then copies those files to a remote server; it works well once you realize that you need to set up an authorized_keys file appropriately on that server.

All of the scripts in this book can be downloaded from the publisher’s website. A couple of the scripts contain minor errors, and others will need modification if they are to work with postal codes and area codes outside the US. Several of the scripts could benefit from revisions to reflect current usage trends for compression, synchronization, and temporary file management tools.

But if you manage any set of Linux, BSD, or Solaris servers, you will find in this book a few scripts that can be adapted to make your work easier.

More reviews about this item: Amazon

Reviewer:  G. K. Jenkins Review #: CR145140 (1706-0358)
Bookmark and Share
  Featured Reviewer  
 
Scripting Languages (I.7.2 ... )
 
 
Linux (D.4.0 ... )
 
 
Macintosh OS (D.4.0 ... )
 
 
Unix (D.4.0 ... )
 
Would you recommend this review?
yes
no
Other reviews under "Scripting Languages": Date
Writing CGI applications with Perl
Meltzer K., Michalski B., Addison-Wesley Longman Publishing Co., Inc., Boston, MA, 2001.  560, Type: Book (9780201710144)
May 1 2001
 Essential PHP fast: building dynamic Web sites with MySQL
Stobart S., Springer-Verlag New York, Inc., Secaucus, NJ, 2002.  256, Type: Book (9781852335786)
Mar 18 2003
PHP and MySQL manual: simple, yet powerful Web programming
Stobart S., Vassileiou M., Springer-Verlag, 2004.  590, Type: Book (9781852337476)
Apr 1 2004
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