UNIX Shells by Example with Cdrom

UNIX Shells by Example with Cdrom

by Ellie Quigley, Ellie Quigley
     
 
The first book that covers all three UNIX shells plus Awk, Sed, and Grep!


Until now, if you wanted to learn UNIX shell programming, you had to purchase three or four books, each covering just some of what you need to know. Now, one book is all you need: UNIX Shells by Example.


This is the first complete,

Overview

The first book that covers all three UNIX shells plus Awk, Sed, and Grep!


Until now, if you wanted to learn UNIX shell programming, you had to purchase three or four books, each covering just some of what you need to know. Now, one book is all you need: UNIX Shells by Example.


This is the first complete, step-by-step guide to using all three of the most important UNIX shells: the C shell, the Bourne shell, and the Korn shell; and the essential UNIX shell programming utilities. Using easy-to-understand, classroom-proven examples, it brings together all the information shell programmers need.


You'll start with the basics: what a UNIX shell is, what it does, and how it relates to other UNIX utilities and UNIX processes. You'll be introduced to shell scripts: what they do, and how to create and run them. There's detailed coverage of the essential tools every shell programmer should understand, including:



  • Grep, Egrep and Fgrep.

  • Sed, the Streamlined Editor.

  • Awk, the UNIX pattern scanning, text filter and report language.


Next, take a closer look at each of the three leading UNIX shells: the C shell, the Bourne shell, and the Korn shell. UNIX Shells by Example presents parallel coverage of each shell, so it's easy to see how they compare--and when to use each.


Teachers and consultants will appreciate the Appendix that includes a listing of syntax and examples of many useful UNIX utilities, a comparison chart of all three shells, a complete guide to proper quoting, and classroom exercises for each topic.


The book's accompanying CD-ROM contains all example programs, a library of additional source code, and a suite of shell programming utilities for UNIX, Linux, DOS, Windows, OS/2, and Amiga systems.


Whether you're a system administrator, application developer or power user, UNIX Shells by Example is the most convenient, cost-effective way to learn UNIX shell programming.


Editorial Reviews

Booknews
A guide to the C, Bourne, and Korn shells and the awk, sed, and grep Unix utilities, written by a silicon valley instructor. The second edition features more examples. An included CD-ROM contains the source code and data files used in the book. Annotation c. Book News, Inc., Portland, OR (booknews.com)

Product Details

ISBN-13:
9780130212221
Publisher:
Prentice Hall Professional Technical Reference
Publication date:
07/12/1999
Edition description:
Older Edition
Pages:
654
Product dimensions:
7.03(w) x 9.25(h) x 1.80(d)

Related Subjects

Read an Excerpt

PREFACE:

Preface

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, I have heard from many of you who have been helped by my book to realize that shell programming doesn't need to be difficult at all! Learning by example makes it easy and fun. In fact, due to such positive feedback, I have been asked by Prentice Hall to produce this new, updated version.

Writing UNIX Shells by Example is the culmination of 17 years of teaching and developing classes for the various shells and those UNIX utilities most heavily used by shell programmers. The course notes I developed for teaching classes have been used by the University of California Santa Cruz and University of California Davis UNIX programs, Sun Microsystems Education, Pyramid Education, DeAnza College, and numerous vendors throughout the world. Depending on the requirements of my client, I normally teach one shell at a time rather than all three. To accommodate the needs of so many clients, I developed separate materials for each of the respective UNIX shells and tools.

Whether I am teaching "grep, sed, and awk," "Bourne Shell for the System Administrator," or "The Interactive Korn Shell," one student always asks: "What book can I get that covers all three shells and the important utilities such as grep, sed, and awk? 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 can recommend a number of excellent bookscovering these topics separately, and some UNIX books that attempt to do it all, but the students want one book with everything and not just a quick survey. They want the UNIX tools, regular expressions, all three shells, quoting rules, a comparison of the three 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 UNIX 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. When shell programming classes are over, whether they last two days or a week or even a semester, the students are proficient and excited about writing scripts. They have learned how to play the shell game. This book will teach how to play the same game whether you take a class or just play by yourself.

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, and UNIX Shells by Example now has been well-received for those who needed to write, read, and maintain shell programs.

The three shells are presented in parallel so that if, for example, you want to know how redirection is performed in one shell, there is a parallel discussion of that topic in each of the other shell chapters, and for quick comparison a chart in Appendix B of this book.

It is a nuisance to have to go to another book or the UNIX man page when all you want is enough information about a particular command to jog your memory on how the command works. To save you time, Appendix A contains a list of useful commands, their syntax and a definition. Examples and explanations are provided for the more robust and often-used commands.

The comparison chart in Appendix B will help you keep the different shells straight especially when you port scripts from one shell to another, and as a quick syntax check when all that you need is a reminder of how the construct works.

One of the biggest hurdles for shell programmers is using quotes properly. The section on quoting rules in Appendix C presents a step-by-step process for successful quoting in some of the most complex command lines. This procedure has dramatically reduced the amount of time programmers waste when debugging scripts with futile attempts at matching quotes properly.

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!

Ellie Quigley (ellieq@ellieq.com)

Meet the Author


Ellie Quigley is author of Perl by Example, and a leading Silicon Valley computer science instructor at the University of California Extension Program and Sun Microsystems. Her classroom materials have been used by community colleges and computer companies throughout the U.S.

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >