Classic Shell Scripting 1st Edition
| Arnold Robbins (Author) Find all the books, read about the author, and more. See search results for this author |
| Nelson H.F. Beebe (Author) Find all the books, read about the author, and more. See search results for this author |
Use the Amazon App to scan ISBNs and compare prices.
Shell scripting skills never go out of style. It's the shell that unlocks the real potential of Unix. Shell scripting is essential for Unix users and system administrators-a way to quickly harness and customize the full power of any Unix system. With shell scripts, you can combine the fundamental Unix text and file processing commands to crunch data and automate repetitive tasks. But beneath this simple promise lies a treacherous ocean of variations in Unix commands and standards. Classic Shell Scripting is written to help you reliably navigate these tricky waters.Writing shell scripts requires more than just a knowledge of the shell language, it also requires familiarity with the individual Unix programs: why each one is there, how to use them by themselves, and in combination with the other programs. The authors are intimately familiar with the tips and tricks that can be used to create excellent scripts, as well as the traps that can make your best effort a bad shell script. With Classic Shell Scripting you'll avoid hours of wasted effort. You'll learn not only write useful shell scripts, but how to do it properly and portably.The ability to program and customize the shell quickly, reliably, and portably to get the best out of any individual system is an important skill for anyone operating and maintaining Unix or Linux systems. Classic Shell Scripting gives you everything you need to master these essential skills.
Frequently bought together
Customers who viewed this item also viewed
Editorial Reviews
About the Author
Arnold Robbins, an Atlanta native, is a professional programmer and technical author. He has worked with Unix systems since 1980, when he was introduced to a PDP-11 running a version of Sixth Edition Unix. He has been a heavy AWK user since 1987, when he became involved with gawk, the GNU project's version of AWK. As a member of the POSIX 1003.2 balloting group, he helped shape the POSIX standard for AWK. He is currently the maintainer of gawk and its documentation. He is also coauthor of the sixth edition of O'Reilly's Learning the vi Editor. Since late 1997, he and his family have been living happily in Israel.
Nelson Beebe is a long time Unix user and system administrator, and has helped for years on Usenet newsgroups.
Product details
- Publisher : O'Reilly Media; 1st edition (February 1, 2005)
- Language : English
- Paperback : 560 pages
- ISBN-10 : 0596005954
- ISBN-13 : 978-0596005955
- Item Weight : 1.94 pounds
- Dimensions : 7 x 1.1 x 9.19 inches
- Best Sellers Rank: #320,907 in Books (See Top 100 in Books)
- #16 in Unix Shell
- #16 in Software Utilities
- #194 in Linux Operating System
- Customer Reviews:
About the authors

Arnold Robbins is a professional programmer, instructor, and author. A long-time GNU Project volunteer, he currently maintains gawk. He has worked with C, C++, Unix, and GNU/Linux since 1980.

Discover more of the author’s books, see similar authors, read author blogs and more
Customer reviews
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
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.
No coverage of Linux OS's. Limited use of networking scripts. Absolutely NO coverage of remote, or cluster management scripting.
However, it DOES cover extensively C-shell, korn shell, bash shell, and Z-shell
.
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
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.
I'd definitely recommend it to anyone new to Linux or even experienced Linux users looking to get a better understanding of the Shell.
It does not even mention C shell "csh" so if a newbie got csh as default, this book would confuse him even more.
Top reviews from other countries
Open anywhere and you'll learn a trick
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.







