Classic Shell Scripting: Hidden Commands that Unlock the Power of Unix
A**G
A solid book on portable shell scripting
"Classic Shell Scripting" by Arnold Robbins and Nelson H. F. Beebe is a decent text on portable shell scripting, which also contains a fair amount of awk. Though written in tutorial form, it explicitly assumes that the reader knows how to use the shell interactively and, as I show below, in some cases implicitly assumes that the reader already knows the basics of shell scripting.The Good: Robbins and Beebe have created a pedagogically sound book which contains tables, fascinating digressions, sidebars (with major options on tools, along with caveats), an annotated bibliography, as well as a glossary. The book can be read straight through, since each chapter builds on the preceding ones, but the aforementioned resources are especially handy when using this book as a reference. Were it not for the tables and sidebars it would be difficult to look up things like how to set the field separator in different tools (-t in sort, -d in cut, -F in awk) or how to ensure case-insensitivity (-i in grep, -f in sort). The topics the authors cover throughout the book are interesting, but the real meat is in chapters 3, 6, 7, 9, 10, which discuss regular expressions, sed, awk (Robbins is the maintainer of gawk and also the co-author/author of books on awk), control flow, command evaluation, and file manipulation. Most of the other chapters are applications of the topics introduced up to that point, and serve to drive home the lessons already learned (though there are pleasant exceptions to this pattern, e.g. the section on crontab in ch. 13, or the material on the Unix filesystem in Appendix B). The writing is generally relaxed and at times borderline silly, e.g. "exit 42 #Return the answer to the ultimate question" or "root) nasty stuff here #Danger Will Robinson, danger!". Importantly, the entire book is focused on scripting that is compatible with the POSIX standard(s) (e.g., the authors prefer printf to echo) -- it is similar in that sense to Peter Seebach's book on portable shell scripting from Apress. Apart from the pointers on the behavior of different shells scattered throughout the volume, the authors have also devoted ch. 14 to portability gotchas and shell-language extensions.The Bad: despite the tutorial nature of this text, it does have a few pedagogical flaws. These include the use of concepts before they are introduced (e.g. here-documents are used in ch. 4 but are mentioned by name only in ch. 5; the ${varname:-word} operator is used in ch. 5 but is not defined until ch. 6; the authors use >&2 three times in ch. 6 before pointing out that they will explain it in ch. 7). Such minor slip-ups extend to the use of concepts that are just not explained anywhere in the book (e.g. in ch. 3 the d command in sed, or in ch. 5 the -c option in grep). In yet other cases, the authors simply do not practice what they preach (e.g. in ch. 7 they recommend $() for command substitution, but then use `` in all but one of the examples in chapter 8, titled "Production Scripts"). On a different note, using this volume as a reference is not as easy as it should be. Tracking down an explanation months after you've finished reading the book can be frustrating, as I will illustrate with a specific example: the index entry for globbing says "see pathname expansion"; going to the index entry for pathname expansion we are pointed only to p. 496 (the glossary entry for that term), but not to any sections in any of the chapters. In the glossary entry on p. 496 we are told that globbing a.k.a. pathname expansion is also called wildcarding. Heading back to the index, no entry for wildcarding is to be found; there's an entry for wildcard expansion, instead, which looks relevant. Unfortunately, that entry not only points to irrelevant sections, but also ends with the inimitable "see also pathname expansion". All the while, subsection 7.5.2 is titled "Wildcarding", but you wouldn't get there simply by using the index. Sadly, the table of contents is similarly unhelpful in this context, since it includes sections, but not subsections.This book could be shorter, but it's still worth reading. I especially enjoyed the sections on regular expressions and on awk. As already explained, readers who know nothing about shell scripting may find this a difficult read, so they might want to first go over "Learning the bash shell" by Newham & Rosenblatt or a similar volume. Finally, access to an ebook version can make up for the deficiencies of the index when using Robbins' & Beebe's text as a reference. All in all, 4.5 stars.Alex Gezerlis
J**N
NOT for Beginners - Must Know Linux/Unix Shell!
As another reviewer stated, this book assumes you have a solid understanding of shell interaction. I do not.Someday perhaps this will serve as a good reference. In the meantime, I'm gonna work with Python and Powershell to get my regex on.
G**5
Received in GOOD condition
No marks or tears. Clean. Obviously used. I intend to buy from this vendor again.
J**L
Decrypting the mystery of shell scripting is what this book does.
Until the past two years, my shell scripting was limited and basic without even knowing you can write "functions" in a shell script. Like how could you do that? This book was concise an to the point and with my basic knowledge of understanding Unix is like "lego" (each command can take input and give output which can be connected another command) then the lightbulb went off and then shell scripting became not so "cryptic" and mysterious. Just follow the syntax....to the LETTER and you can write powerful scripts. I do agree that heavy testing should be done using "echo" or "printf" before running commands to "move/rename" or worse "delete/remove".Korn Shell is the popular one and now I find myself even more comfortable and confident in writing shell scripts with heavy error trapping and being elegant in exiting properly. Excellent book and now I'm on to reading the O'Reilly book "Learing the Korn Shell" by Bill Rosenblatt
A**R
Great shell scripting book - examples galore!
For me, this is an excellent book! I've written a few shell scripts over the last several years, but I always had to look up the syntax, and never really got into the flow of it. While reading this book, I started coding some of the examples and it just clicked!I'm now writing a lot of little (and not so little; 1200 lines of bash scripts so far) shell scripts. There were always several little nuances that always bugged me, but the examples helped me remember how to do what.And there are a lot of examples of not only bash (and sh, ksh) but sed, awk, and others that help you along.Worth keeping on your bookshelf. I'd buy it again in a second.
K**M
Excellent book, highly recommended
I am a shell programmer by trade and this is my favorite shell programming book of all. It's well written, but more importantly the examples are excellent. This book was written by someone who obviously knows what he's doing. Robbins covers the areas that expose the real power of shell programming, like positional parameters in variables, regular expression syntax, etc., without being overwhelming. It's just a great programming book.How much do I like Shell Scripting? Well, I've hard the printed copy for years, but I recently bought the electronic copy as well so I'd have it on my Kindle.
R**G
A bit dry and non-interactive
It would be great if there were problems to solve for the reader, programs to modify. As it is, it is page after page of explanation, and programs that the author himself has written. It is unclear at what stage a beginner should start entering and modifying the programs.
M**S
After 17 Years I Still Learned Some Shell
I've been writing Korn Shell for over 17 years and I figured this book would offer me nothing more, but I was wrong. Just the two pages of notes I took from my first read made it well worth the money. Full of examples that are easy to follow, this book can take your scripts in new directions. I wish there was more detail on using functions to return Boolean values, but that's about the only complaint I can muster and that's if I'm being really picky. This is by far one of my favorite books on the subject. These guys get "it" and they can help the reader get "it" too. I highly recommend this book to all UNIX/Linux scripters, regardless of the shell they use.
B**S
Possibly one of the best introduction to UNIX/LINUX out there.
This book is well paced and written. The authors manage to write in a very approachable way without missing any of the essential, and without patronising the reader.The title may mislead some into thinking that this book covers only scripting or is not suitable for starting to learn the *NIX shells. Nothing could be further from the truth. Taking the reader through the classic tools of unix, the authors then show how to bring those tools together and how to build continually more complex programs.Also appreciated are the examples throughout the book. These examples, unlike some similar titles, are there in just the right amount. You don't feel swamped by pages and pages of code, nor lost with nothing to demonstrate what is being said. The examples are always relevant, allowing you to learn important principles and start writing your own code.Overall, even if advanced users might not benefit as much from this book, it is still highly recommended read for anybody interested in using the power of the unix shell, either totally new users to the command line, or seasoned users with more experience. And surprisingly, This book remains accessible to both.
B**R
A UNIX book that's actually clearly written !!!!!
If you're like me then you've bought a few UNIX books and are none the wiser as you seem to be on the outside looking in at some 6th-form science club. You are, however , 'in IT' and have to get to understand shell-scripting rather than just copy other peoples code. Get this book. It's normal !! It achieves twin aims of covering the subject in depth and being easy to understand. It covers shell scripting very well ( all the curly brackets stuff as well as some very simple , but extremely useful , sed and awk code); it also covers all the usual UNIX stuff - it is entirely self contained. 'UNIX shell commands plus scripting' would be a better , if less snappy , title. I don't usually 'do' reviews - this is , however, a deserved exception.
A**R
Must have
Learn something new each time I open this. As an ops guy, bash is second nature and must have. Even after years inbtbe industry, others swear by this as a learning aid and reference.Open anywhere and you'll learn a trick
R**D
Classic Shell Scripting: Hidden Commands that Unlock the Power of Unix
This is the second time I purchased this book. I had to purchase it twice because it is a must have for any Unix/ Linux Administrator, Developer or Network engineer. If you don't have it i recommend you buy it!!!
M**I
Five Stars
Arrived quickly, just what I needed