Outils pour utilisateurs

Outils du site


issue118:critique_litteraire

Ceci est une ancienne révision du document !


Wicked Cool Shell Scripts (2nd Edition) 101 Scripts for Linux, Mac OS X, and UNIX Systems

by Dave Taylor

October 2016, 392 pp. ISBN: 978-1-59327-602-7

The book Wicked Cool Shell Scripts by Dave Taylor and Brandon Perry (2nd Edition) has a relatively simple premise. They introduce a variety of shell scripts to you, explain what they do, and give you some simple enhancements you can make on your own. For anyone looking for an actual guided tour through creating your first few shell scripts, this is not the book for you. If, however, you learn by example, or simply want a repertoire of helpful shell scripts, this is a great resource.

The Good

The book clearly lays out the scripts (with comments), and explains some of the more unusual aspects. They then give you the sample output of each possible result, as well as a bit of ‘homework’ - that is, some changes or enhancements you can try on your own. There are 101 of these scripts, which range from what I would refer to as niche (i.e. relatively uncommon scenarios) to versions of scripts I use almost every day.

Some chapters, such as Chapter 2: ‘Improving on User Commands’ are very useful for any kind of CLI user, while other chapters are geared towards system administration, and may therefore not be for everyone.

The book also offers all source files (and some example files) as a zip archive from the book’s product page (http://nostarch.com/wcss2). However, I was also happy to discover via Google that there is a Git repository available too. Unfortunately, this doesn’t seem to be indicated anywhere. The repository is here: https://github.com/brandonprry/wicked_cool_shell_scripts_2e

There is also an entire chapter dedicated to OS X (macOS). This is very useful, as there are a variety of differences between Bash (and other commands) in Linux and Apple’s OS. An Appendix is also included, for installing Bash in Windows 10. It’s nice to see that the book is willing to cover each option - even if it specifically states that some scripts are untested in other OSes. The addition of the Windows 10 information also shows how recent the book is - I originally feared that it may have just missed that development.

Differences Between 2nd Edition and 1st Edition?

According to the jacket (and the Intro), the 2nd Edition contains 23 new scripts, including a ZIP Code lookup, a Bitcoin address information retriever, a suite of tools for working with cloud services like Dropbox and iCloud, tools for renaming and applying commands to files in bulk, and image processing and editing tools.

As I don’t own the 1st Edition, I can’t say much about the actual differences, and must instead rely on the author and the book’s comments.

The Less Good

I haven’t found anything inherently bad about this book. The scripts all fulfil their purpose, and I haven’t run into any issues on an up-to-date ArchLinux installation. There are, however, a few inconsistencies. In Chapter 1, the author introduces a script for normalizing date formats - where any format is assumed to be either 8/29/2016, or August 29, 2016. In other words, the typical “US” format. It would have been nice to see the script accept dates in the format DD/MM/YYYY. Especially due to the fact that another script in the same chapter supports different thousands and decimal separators (such as the US format of 1,000.00 and the German format of 1.000,00). While reading through the book, I didn’t notice too many occurrences of this, but that makes those inconsistencies stick out even more. Even just acknowledging this by making it an enhancement task would be sufficient.

Conclusion

There are a variety of scripts in this book that I have alternative versions of (either because I wrote them, or because they belong to a different tool I use). However, there are still a great many scripts that I will begin to use, or adjustments I will carry over to my own versions. As such, the book fulfils its premise completely - it does indeed offer a well-stocked toolbox of shell scripts for the average (and professional) Linux user. By including information on OS X and Windows 10 as well, it can give even experienced users something new to try or test.

I would be tempted to give it a 5 out of 5, but unfortunately feel that some of the inconsistencies could have easily been avoided, and are generally a question of formats that are relevant in many other countries, including the country I live in, therefore requiring some effort on my part in order to implement them.

issue118/critique_litteraire.1488277061.txt.gz · Dernière modification : 2017/02/28 11:17 de auntiee