Home > Store > Operating Systems, Server > Linux/UNIX/Open Source

larger cover

Add To My Wish List

Unix Shell Programming, 3rd Edition

  • By Stephen G. Kochan, Patrick Wood
  • Published Feb 27, 2003 by Sams.
    • Copyright 2003
    • Dimensions: 7-3/8" x 9-1/8"
    • Pages: 456
    • Edition: 3rd
    • Book
    • ISBN-10: 0-672-32490-3
    • ISBN-13: 978-0-672-32490-1
    • eBook (Adobe DRM)
    • ISBN-10: 0-7686-6327-X
    • ISBN-13: 978-0-7686-6327-3

Register your product to gain access to bonus material or receive a coupon.

  • Description
  • Downloads
  • Reviews
  • Sample Content

Product Author Bios

Stephen G. Kochan is the owner of TechFitness, a technology-based fitness company. Prior to that, he was the President and CEO of Pipeline Associates, a company specializing in color printing software. Mr. Kochan is the author of several best-selling books on Unix and C programming, including the best-selling Programming in C. He also acted as Series Editor for the Hayden Unix System Library.

Patrick Wood is the CTO of the New Jersey location of Electronics for Imaging. He was a member of the technical staff at Bell Laboratories when he met Mr. Kochan back in 1985. Together they founded Pipeline Associates, Inc., a Unix consulting firm, where he was the Vice President. The co-authored Exploring the Unix System, Unix System Security, Topics in C Programming, and Unix Shell Programming.

Unix Shell Programming is a tutorial aimed at helping Unix and Linux users get optimal performance out of their operating out of their operating system. It shows them how to take control of their systems and work efficiently by harnessing the power of the shell to solve common problems. The reader learns everything he or she needs to know to customize the way a Unix system responds.

The vast majority of Unix users utilize the Korn shell or some variant of the Bourne shell, such as bash. Three are covered in the third edition of Unix Shell Programming. It begins with a generalized tutorial of Unix and tools and then moves into detailed coverage of shell programming.

Topics covered include: regular expressions, the kernel and the utilities, command files, parameters, manipulating text filters, understanding and debugging shell scripts, creating and utilizing variables, tools, processes, and customizing the shell.

Downloads

All the code developed for the book in one convenient file for download - 11 kb -- examples.shar

Customer Reviews

46 of 49 people found the following review helpful
4.0 out of 5 stars A fairly painless, helpful introduction to UNIX scripting, May 24, 2003
By 
Richard Bejtlich "TaoSecurity" (Metro Washington, DC) - See all my reviews
(REAL NAME)   
This review is from: Unix Shell Programming (3rd Edition) (Paperback)
"UNIX Shell Programming, 3rd Ed" (USP3E) is probably the book to buy if you're a beginning UNIX user with dreams of writing shell scripts. The book does a good job of explaining many of the key concepts needed to get real work done on UNIX systems. While readers with advanced backgrounds will prefer a book like "Mastering UNIX Shell Scripting" by Randal Michael, USP3E will please most UNIX scripting newbies.

USP3E begins with a review of the basics -- working with files and directories, redirecting input/output, pipes, and the shell itself. Chapter four's discussion of regular expressions is generally useful, although "saving matched characters" on p. 64 was confusing. This made the "command substitution" material on p. 129 unclear. Chapter six was devoted to the use of different sorts of quotes, which seems excessive until one realizes the significant differences between using single and double quotation marks in scripts... Read more
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


15 of 15 people found the following review helpful
5.0 out of 5 stars Dated, but fantastic, May 31, 2001
By 
Alex J. Avriette "Alex Avriette" (Arlington, Virginia USA) - See all my reviews
(REAL NAME)   
Amazon Verified Purchase(What's this?)
I am a perl and C programmer, and I am very familiar with the shells outlined in this book. So the material was not particularly "new" for me. I can see how it would be difficult to understand for a user who was new to shell programming.

If the intended audience is the intermediate unix user who knows something of programming, this book gets a full 5 star, my seal-of-approval rating. Terrific.

One thing it is lacking is a brief mention of perl or of awk. In many cases, it is simpler to write:

date | awk '{ print $2 }'

instead of:

date | cut -d' ' -f2

or, at least from the standpoint of understandability and readability. but the book doesnt claim to be a manual for awk, and oreilly has an excellent book on the subject.

I continually recommend this book to people, and where ever I go, I find this book on the bookshelves of successful people.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


13 of 13 people found the following review helpful
4.0 out of 5 stars First and only shell programming book I own, May 22, 1998
I bought this book when it was originally published back in 1990. I started with little programming experience, and no shell programming experience. It brought me up to speed quickly. I no longer write many shell scripts; however, I still use it as a desk reference when I do. For any UNIX system administrator, this book (or one just like it) is essential.

BTW, I have been looking for a better book all these years and haven't found one. It's not that I think this book is perfect, rather there just aren't many good books on this subject.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


Share your thoughts with other customers:
 See all 50 customer reviews...

Online Sample Chapters

What Is the Shell

What Is the Unix Shell?

Table of Contents



1. Introduction.


2. A Quick Review of the Basics.

Some Basic Commands. Working with Files. Working with Directories. Filename Substitution. Standard Input/Output and I/O Redirection. Pipes. Standard Error. More on Commands. Command Summary. Exercises.



3. What Is the Shell?

The Kernel and the Utilities. The Login Shell. Typing Commands to the Shell. The Shells Responsibilities.



4. Tools of the Trade.

Regular Expressions. cut. paste. sed. tr. grep. sort. uniq. Exercises.



5. And Away We Go.

Command Files. Variables. Built-in Integer Arithmetic. Exercises.



6. Can I Quote You on That?

The Single Quote. The Double Quote. The Backslash. Command Substitution. Exercises.



7. Passing Arguments.

The shift Command. Exercises.



8. Decisions, Decisions.

Exit Status. The test Command. The else Construct. The exit Command. The elif Construct. The case Command. The Null Command :. The && and || Constructs. Exercises.



9. Round and Round She Goes.

The for Command. The until Command. More on Loops. The getopts Command. Exercises.



10. Reading and Printing Data.

The read Command. The printf Command. Exercises.



11. Your Environment.

Local Variables. Exported Variables. PS1 and PS2. HOME, James. Your PATH. Your Current Directory. More on Subshells. Your .profile File. The TERM Variable. The TZ Variable. Exercises.



12. More on Parameters.

Parameter Substitution. The $0 Variable. The set Command. The IFS Variable. The readonly Command. The unset Command. Exercises.



13. Loose Ends.

The eval Command. The wait Command. The trap Command. More on I/O. Functions. The type Command. Exercises.



14. Rolo Revisited.

Design Considerations. rolo. add. Lu display. rem. change. listall. Sample Output. Exercises.



15. Interactive and Nonstandard Shell Features.

Getting the Right Shell. The ENV File. Command-Line Editing. Command History. The vi Line Edit Mode. The Line Edit Mode. Other Ways to Access Your History. Functions. Integer Arithmetic. The alias Command. Arrays. Job Control. The Restricted Shell rsh. Miscellaneous Features. Compatibility Summary. Exercises.



Appendix A. Shell Summary.

Startup. Commands. Comments. Parameters and Variables. Command Re-entry. Quoting. Filename Substitution. I/O Redirection. Exported Variables and Subshell Execution. Functions. Job Control. Command Summary.



Appendix B. For More Information.

Online Documentation. Documentation on the Web. Books.

 
Best Value

Book + eBook Bundle  $80.98  $48.59

Book Price: $35.99
eBook Price: $12.60

Buy

This book includes free shipping!

Buy

Book  $44.99  $35.99

Usually ships in 24 hours.

This book includes free shipping!

Buy

eBook (Adobe DRM)  $35.99  $28.79

About Adobe DRM eBooks

Information This eBook requires the free Adobe® Digital Editions software.

Before downloading this DRM-encrypted PDF, be sure to:


  • Install the free Adobe Digital Editions software on your machine. Adobe Digital Editions only works on Macintosh and Windows, and requires the Adobe Flash Player. Please see the official system requirements.
  • Authorize your copy of Adobe Digital Editions using your Adobe ID. If you don't already have an Adobe ID, you can create one here.
Purchase Reward: One Month Free Subscription
By completing any purchase on InformIT, you become eligible for an unlimited access one-month subscription to Safari Books Online.

Get access to thousands of books and training videos about technology, professional development and digital media from more than 40 leading publishers, including Addison-Wesley, Prentice Hall, Cisco Press, IBM Press, O'Reilly Media, Wrox, Apress, and many more. If you continue your subscription after your 30-day trial, you can receive 30% off a monthly subscription to the Safari Library for up to 12 months. That's a total savings of $199.