Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet or computer – no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera, scan the code below and download the Kindle app.
UNIX Shells by Example (4th Edition) Paperback – Sept. 24 2004
The world’s #1 shell programming book—now fully updated for Linux and more!
UNIX Shells by Example is the world’s #1 shell programming book, from the world’s #1 shell programming instructor: Ellie Quigley. In UNIX Shells by Example, Fourth Edition, Quigley has thoroughly updated her classic and delivers the information today’s shell programmers need most—including comprehensive coverage of Linux shell programming with bash!
Drawing on 20 years’ experience as a shell programming instructor, Quigley guides you through every facet of programming all leading UNIX/Linux shells: bourne, bash, korn, C, and tcsh. Quigley illuminates each concept with up-to-date, classroom-tested code examples designed to help you jump-start your own projects. She also systematically introduces awk, sed, and grep for both UNIX and GNU/Linux . . . making this the only shell programming book you’ll ever need!
New in this edition:- Comprehensive coverage of Linux shell programming with bash
- Shell Programming QuickStart: makes first-time shell programmers productive in just 15 pages
- Complete, practical debugging chapter
- Updated coverage of the latest UNIX and GNU/Linux versions of awk, sed, and grep
- Shell programming for sysadmins: walks you through key UNIX and Linux system shell scripts
- Shell programming fundamentals: what shells are, what they do, how they work
- Choosing the right shell for any application
Nearly 50,000 UNIX/Linux sysadmins, developers, and power users have used previous editions of UNIX Shells by Example to become expert shell programmers. With UNIX Shells by Example, Fourth Edition, you can, too—even if you’re completely new to shell programming. Then, once you’re an expert, you’ll turn to this book constantly as the best source for reliable answers, solutions, and code.
About the CD-ROMComprehensive shell programming code library: all source code and data files for this book’s hundreds of example programs.
- ISBN-10013147572X
- ISBN-13978-0131475724
- Edition4th
- PublisherPrentice Hall
- Publication dateSept. 24 2004
- LanguageEnglish
- Dimensions17.78 x 4.45 x 22.86 cm
- Print length1200 pages
Customers who bought this item also bought
sed & awk: UNIX Power ToolsPaperbackFREE Shipping by AmazonGet it by Monday, Jun 16Only 1 left in stock (more on the way).
UNIX and Linux System Administration HandbookEvi NemethPaperbackFREE Shipping by AmazonGet it by Monday, Jun 16Only 9 left in stock (more on the way).
Product description
From the Inside Flap
Playing the "shell" game is a lot of fun. This book was written to make your learning experience both fun and profitable. Since the first edition was published, many of you who have been helped by my book have contacted me, telling me that the book made you realize that shell programming doesn't need to be difficult at all! Learning by example makes it easy and fun. In fact, because of such positive feedback, I have been asked by Prentice Hall to produce this fourth edition of UNIX(R) Shells by Example for UNIX and Linux users, programmers, and administrators. Along with updated material throughout, it includes three completely new chapters, with full coverage of the GNU tools for those of you who use Linux. With the meteoric rise of Linux popularity, it seemed like a good time to combine the best of Linux Shells by Example with UNIX(R) Shells by Example and produce a single volume that touches on all the various aspects of the UNIX/Linux shell world.
The new chapters include Chapter 2, "Shell Programming QuickStart," an introductory jump-start for programmers who want a quick survey of the shell programming constructs and how they differ; Chapter 15, "Debugging Shell Scripts," which gives you an example of an error message, what caused it, and how to fix it; and Chapter 16, "The System Administrator and the Shell," which demonstrates how the shell is used by system administrators, from system boot-up to shutdown.
Writing UNIX(R) Shells by Example was the culmination of 21 years of teaching and developing classes for the various shells and UNIX/Linux utilities most heavily used by shell programmers. The course notes I developed have been used by the University of California, Santa Cruz; the University of California, Davis; Sun Microsystems; Apple Computer; Xilinx; National Semiconductor; LSI Logic; De Anza College; and numerous vendors throughout the world. Depending upon the requirements of my client, I normally teach one shell at a time rather than all of them at once. To accommodate the needs of so many clients, I developed separate materials for each of the respective UNIX/Linux shells and tools.
Whether I am teaching "Grep, Sed, and Awk," "Bourne Shell for the System Administrator," "The Interactive Korn Shell," or "Bash Programming," one student always asks, "What book can I get that covers all the shells and the important utilities such as grep, sed, and awk? How does awk differ from gawk? Will this work if I'm using Linux or is this just for Solaris? Should I get the awk book, or should I get a book on grep and sed? Is there one book that really covers it all? I don't want to buy three or four books in order to become a shell programmer."
In response, I could recommend a number of excellent books covering these topics separately, and some UNIX and Linux books that attempt to do it all, but the students want one book with everything, and not just a quick survey. They want the tools, regular expressions, all the major shells, quoting rules, a comparison of the shells, exercises, and so forth, all in one book. This is that book.
As I wrote it, I thought about how I teach the classes and organized the chapters in the same format. In the shell programming classes, the first topic is always an introduction to what the shell is and how it works. Then we talk about the utilities such as grep, sed, and awk--the most important tools in the shell programmer's toolbox. When learning about the shell, it is presented first as an interactive program where everything can be accomplished at the command line, and then as a programming language where the programming constructs are described and demonstrated in shell scripts. (Since the C and TC shells are almost identical as programming languages, there are separate chapters describing interactive use, but only one chapter discussing programming constructs.)
It's one thing to write a script, but yet another to debug it. I have been working with the shells for so long, that I can recognize bugs in a program almost before they happen! But these bugs are hard to find until you get used to the error messages and what they mean. I added a chapter on debugging to help you understand what the often cryptic error messages mean and how to fix them. Since the diagnostics for the shells may differ, each shell is presented with the most common error messages and what caused them.
Many students take a shell course as a step toward learning system administration. Susan Barr, a teaching colleague of mine who teaches system administration and shell programming, offered to share her extensive knowledge and write a chapter to describe how the system administrator uses the shell (Chapter 16, "The System Administrator and the Shell").
Having always found that simple examples are easier for quick comprehension, each concept is captured in a small example followed by the output and an explanation of each line of the program. This method has proven to be very popular with those who learned Perl programming from my first book, Perl by Example, or JavaScript from JavaScript(TM) by Example, and with those who learned to write shell programs from UNIX(R) Shells by Example.
Another aid to comprehension is that the five shells are discussed in parallel. If, for example, you're working in one shell but want to see how redirection is performed in another shell, you will find a parallel discussion of that topic presented in each of the other shell chapters.
It can be a nuisance to shuffle among several books or the man pages when all you want is enough information about a particular command to jog your memory on how a particular command works. To save you time, Appendix A contains a list of useful UNIX and Linux commands, their syntax, and definitions. Examples and explanations are provided for the more robust and often-used commands.The comparison table in Appendix B will help you keep the different shells straight, especially when you port scripts from one shell to another, and serves as a quick syntax check when all you need is a reminder of how the construct works.
I think you'll find this book a valuable tutorial and reference. The objective is to explain through example and keep things simple so that you have fun learning and save time. Since the book replicates what I say in my classes, I am confident that you will be a productive shell programmer in a short amount of time. Everything you need is right here at your fingertips. Playing the shell game is fun . . . You'll see!
013147572XP08312004
From the Back Cover
The world’s #1 shell programming book—now fully updated for Linux and more!
UNIX Shells by Example is the world’s #1 shell programming book, from the world’s #1 shell programming instructor: Ellie Quigley. In UNIX Shells by Example, Fourth Edition, Quigley has thoroughly updated her classic and delivers the information today’s shell programmers need most—including comprehensive coverage of Linux shell programming with bash!
Drawing on 20 years’ experience as a shell programming instructor, Quigley guides you through every facet of programming all leading UNIX/Linux shells: bourne, bash, korn, C, and tcsh. Quigley illuminates each concept with up-to-date, classroom-tested code examples designed to help you jump-start your own projects. She also systematically introduces awk, sed, and grep for both UNIX and GNU/Linux . . . making this the only shell programming book you’ll ever need!
New in this edition:- Comprehensive coverage of Linux shell programming with bash
- Shell Programming QuickStart: makes first-time shell programmers productive in just 15 pages
- Complete, practical debugging chapter
- Updated coverage of the latest UNIX and GNU/Linux versions of awk, sed, and grep
- Shell programming for sysadmins: walks you through key UNIX and Linux system shell scripts
- Shell programming fundamentals: what shells are, what they do, how they work
- Choosing the right shell for any application
Nearly 50,000 UNIX/Linux sysadmins, developers, and power users have used previous editions of UNIX Shells by Example to become expert shell programmers. With UNIX Shells by Example, Fourth Edition, you can, too—even if you’re completely new to shell programming. Then, once you’re an expert, you’ll turn to this book constantly as the best source for reliable answers, solutions, and code.
About the CD-ROMComprehensive shell programming code library: all source code and data files for this book’s hundreds of example programs.
About the Author
Ellie Quigley is the author of many best-selling books on Linux shells, UNIX shells, and Perl programming. A leading instructor and trainer, her courses in Perl and UNIX shell programming at the University of California Santa Cruz Extension Program, Sun Microsystems, and numerous corporations and colleges have become legendary throughout Silicon Valley. Quigley’s company, Learning Enterprises, Inc., offers on-site training in Unix, Perl, C/C++, Java, and system administration.
Excerpt. © Reprinted by permission. All rights reserved.
Playing the “shell” game is a lot of fun. This book was written to make your learning experience both fun and profitable. Since the first edition was published, many of you who have been helped by my book have contacted me, telling me that the book made you realize that shell programming doesn’t need to be difficult at all! Learning by example makes it easy and fun. In fact, because of such positive feedback, I have been asked by Prentice Hall to produce this fourth edition of UNIX® Shells by Example for UNIX and Linux users, programmers, and administrators. Along with updated material throughout, it includes three completely new chapters, with full coverage of the GNU tools for those of you who use Linux. With the meteoric rise of Linux popularity, it seemed like a good time to combine the best of Linux Shells by Example with UNIX® Shells by Example and produce a single volume that touches on all the various aspects of the UNIX/Linux shell world.
The new chapters include Chapter 2, “Shell Programming QuickStart,” an introductory jump-start for programmers who want a quick survey of the shell programming constructs and how they differ; Chapter 15, “Debugging Shell Scripts,” which gives you an example of an error message, what caused it, and how to fix it; and Chapter 16, “The System Administrator and the Shell,” which demonstrates how the shell is used by system administrators, from system boot-up to shutdown.
Writing UNIX® Shells by Example was the culmination of 21 years of teaching and developing classes for the various shells and UNIX/Linux utilities most heavily used by shell programmers. The course notes I developed have been used by the University of California, Santa Cruz; the University of California, Davis; Sun Microsystems; Apple Computer; Xilinx; National Semiconductor; LSI Logic; De Anza College; and numerous vendors throughout the world. Depending upon the requirements of my client, I normally teach one shell at a time rather than all of them at once. To accommodate the needs of so many clients, I developed separate materials for each of the respective UNIX/Linux shells and tools.
Whether I am teaching “Grep, Sed, and Awk,” “Bourne Shell for the System Administrator,” “The Interactive Korn Shell,” or “Bash Programming,” one student always asks, “What book can I get that covers all the shells and the important utilities such as grep, sed, and awk? How does awk differ from gawk? Will this work if I’m using Linux or is this just for Solaris? Should I get the awk book, or should I get a book on grep and sed? Is there one book that really covers it all? I don’t want to buy three or four books in order to become a shell programmer.”
In response, I could recommend a number of excellent books covering these topics separately, and some UNIX and Linux books that attempt to do it all, but the students want one book with everything, and not just a quick survey. They want the tools, regular expressions, all the major shells, quoting rules, a comparison of the shells, exercises, and so forth, all in one book. This is that book.
As I wrote it, I thought about how I teach the classes and organized the chapters in the same format. In the shell programming classes, the first topic is always an introduction to what the shell is and how it works. Then we talk about the utilities such as grep, sed, and awk—the most important tools in the shell programmer’s toolbox. When learning about the shell, it is presented first as an interactive program where everything can be accomplished at the command line, and then as a programming language where the programming constructs are described and demonstrated in shell scripts. (Since the C and TC shells are almost identical as programming languages, there are separate chapters describing interactive use, but only one chapter discussing programming constructs.)
It’s one thing to write a script, but yet another to debug it. I have been working with the shells for so long, that I can recognize bugs in a program almost before they happen! But these bugs are hard to find until you get used to the error messages and what they mean. I added a chapter on debugging to help you understand what the often cryptic error messages mean and how to fix them. Since the diagnostics for the shells may differ, each shell is presented with the most common error messages and what caused them.
Many students take a shell course as a step toward learning system administration. Susan Barr, a teaching colleague of mine who teaches system administration and shell programming, offered to share her extensive knowledge and write a chapter to describe how the system administrator uses the shell (Chapter 16, “The System Administrator and the Shell”).
Having always found that simple examples are easier for quick comprehension, each concept is captured in a small example followed by the output and an explanation of each line of the program. This method has proven to be very popular with those who learned Perl programming from my first book, Perl by Example, or JavaScript from JavaScript(TM) by Example, and with those who learned to write shell programs from UNIX® Shells by Example.
Another aid to comprehension is that the five shells are discussed in parallel. If, for example, you’re working in one shell but want to see how redirection is performed in another shell, you will find a parallel discussion of that topic presented in each of the other shell chapters.
It can be a nuisance to shuffle among several books or the man pages when all you want is enough information about a particular command to jog your memory on how a particular command works. To save you time, Appendix A contains a list of useful UNIX and Linux commands, their syntax, and definitions. Examples and explanations are provided for the more robust and often-used commands.The comparison table in Appendix B will help you keep the different shells straight, especially when you port scripts from one shell to another, and serves as a quick syntax check when all you need is a reminder of how the construct works.
I think you’ll find this book a valuable tutorial and reference. The objective is to explain through example and keep things simple so that you have fun learning and save time. Since the book replicates what I say in my classes, I am confident that you will be a productive shell programmer in a short amount of time. Everything you need is right here at your fingertips. Playing the shell game is fun . . . You’ll see!
Product details
- ASIN : 013147572X
- Publisher : Prentice Hall
- Publication date : Sept. 24 2004
- Edition : 4th
- Language : English
- Print length : 1200 pages
- ISBN-10 : 9780131475724
- ISBN-13 : 978-0131475724
- Item weight : 1.68 kg
- Dimensions : 17.78 x 4.45 x 22.86 cm
- Customer Reviews:
About the author

Discover more of the author’s books, see similar authors, read book recommendations and more.
Customer reviews
Top reviews from Canada
There was a problem filtering reviews. Please reload the page.
- Reviewed in Canada on January 8, 2014Format: PaperbackVerified Purchaseit will help me in my job, as a computer tech who just learn linux and will be doing script
- Reviewed in Canada on April 19, 2010Format: PaperbackI was required to get this book as a class text, and it has been the most useful book I bought this semester. And like my programming book, I hope will be useful in upcoming classes.
It starts with the histroy of Unix and Linux, and the various shells that have been developped and inlcuded with popular distributions.
Starting basic commands, it moves onto bigger tools; Sed, Grep, and Awk. Then chapters devoted to all the major shells: Bourne, C, TC, Korn, and Bash. It has seperate chapters for ach shell, along with a chapter devoted to programming in each shell.
It clear descriptions, plenty of examples and excercises, covering the most utilities. Also has notes covering the differences (if any exist) that appear in GNU versions of each tool.
A great purchase if you want understand Unix/Linux Shell programming.
Top reviews from other countries
F. RiazReviewed in the United States on September 27, 20075.0 out of 5 stars A great intro to UNIX power tools
Format: PaperbackVerified PurchaseHad to learn awk for a work assignment, so the natural choice was the O'Riely book. After struggling with it I had realized that as a novice UNIX power tools programmer, I needed a basic-to-intermediate level text with lots of examples. That's where Quigley's came to the rescue.
Some positives about the text are as follows
1, every concept and programming construct is followed by an example
2, the sample data file (to try the different programming techniques against) are repeated multiple times. This saves time and effort and avoids the hassle of flipping back and forth in the book
3, the material has been covered in just the right depth & breadth
The plan going forward is to use "Unix by example" as the stepping stone to advanced awk, sed, and Korn shell programming texts.
The second phase of the plan is to buy, read, and try every example from Quigley's Perl text before investing in Oreily's counterpart text.
All in all, a great introduction to the Unix power tools
J. KennedyReviewed in the United States on May 20, 20105.0 out of 5 stars Best reference for shell scripting
Format: PaperbackVerified PurchaseOf all the computer books I own (I am a UNIX/Linux system administrator so I have a large library), this is the only book that I kept buying the newest edition when it came out (this is the 5th time I have bought the book). The 1st edition and this edition are the only books I have ever worn out. If you write shell scripts this book is a MUST HAVE for your library. The examples are plentiful and well explained. I am currently training a few junior system admins Linux in general and shell scripting. I have come close to ordering them to buy this book.
I admit, I only really use about 1/2 of the book for BASH, SED, and AWK but still, I can not recommend it enough.
Khon LieuReviewed in the United States on January 27, 20115.0 out of 5 stars Super Simple and Concise
Format: PaperbackVerified PurchaseI must say, the reviews before me did not lie. being a fairly new programmer, i knew NOTHING about shells or what exactly the purpose of the terminal was.. there was a review on the back of the book saying that "...Makes first-time shell programmers productive in just 15 pages" i would say that's a slight exaggeration. but certainly by the end of the first chapter you'll have a solid understanding of the different shells, and the basic shell commands =). I'd certainly recommend this book to anyone looking to understand what shells are about. And for that matter, i'd recommend this book to anyone looking to write shell scripts. the style of teaching in this book is great =)
JinduReviewed in the United States on February 22, 20144.0 out of 5 stars A good book for first time Unix/Linux user.
Format: PaperbackVerified PurchaseI like the comprehensive explanatory notes, especially the pattern of explaining each example scripts, line-by-line. I've not really got down to using the accompanying CD, to know how well the codes would run, but to the extent I've used the book, it been satisfactory!