This book is intended to assist UNIX users in understanding and dealing with five of the most popular UNIX shells: the Bourne shell (sh); the C shell (csh); the Korn shell (ksh); the TC shell (tcsh); and the Z shell (zsh). The idea came mainly out of frustration in trying to get understandable information on shell usage. Much has been written on UNIX as a whole but rarely is more than a chapter on Bourne shell or C shell included, and these usually prove to be little more than a loose translation of the online manual (man) pages. Shells are certainly sophisticated and powerful enough to warrant a detailed treatment on their own. The man pages, as any UNIX user is well aware, are fine for listing commands and associated flags but that is where the usefulness ends. Examples are seldom found and some of the features are covered in one or two lines of text, leaving the user to overlook their importance. The man pages are, after all, meant to act as a reference more than an actual instruction manual and should be treated as such.
Hopefully this book will achieve two goals. First, to give a clear and concise look at each of five shells. Each shell will be examined from the point of view of interactive work features, and then from a shell programming point of view. Examples will be used as much as possible to lend illustration to the concepts presented in the text, especially in the area of shell programming. Hopefully, the range of examples will be such that there will be something that everyone can use. New UNIX users will then be able to pick up on some of the powerful features of the particular shell(s) of interest and develop a feel for shell programming, which is probably the most flexible and exciting feature of UNIX shells in general. The second goal of the book is to allow users the opportunity to examine the features of the various shells covered and determine which shell(s) might be right for them. Each shell will be contrasted with the others to demonstrate the strengths and weaknesses compared with the rest. This we hope will make this book truly unique. As with most other things in life, choice can make things more difficult than expected. While it is nice to have choice, making a choice can require a level of research that most people just do not have the time to invest. Sometimes the number of choices is not even known, further complicating the decision process - how can you make a choice if you do not know what the choices are? In this book enough information will be presented so the users can make educated decisions without spending the time trying to gather the information on their own, or having to make sense of it afterwards.
Users new to UNIX will be able to become acquainted with the shell they are provided with, learning the details of shell usage until they are able to decide if a different shell may better suit their needs. Even users who have spent many years mastering a particular shell may find that some of the more recent shells provide powerful features that they can tailor to their specific needs. If any of the shells mentioned in this book are not available on your machine, most system administrators can be persuaded to load them on to your machine for use. To further assist in making the various shells available, FTP sites where they can be found are included.
This book will be of great interest to users of personal computers who are considering moving or have just moved to the new UNIX-compatible operating system for the personal computer - LINUX. LINUX is distributed freely in electronic form and for low cost from many vendors. The standard software distribution includes many of the shells described in this book.
Norman J. Buchanan
Douglas M. Gingrich