on December 12, 2002
I can't believe the reviewer who gave two stars to this book saying it's "outdated". Yes, it's dated. Yes, it doesn't tell you about Linux and FreeBSD and GNOME and KDE. But it's still absolutely the best introduction to the Unix *Programming* environment. Whatever else it is, Unix is a programmer's delight. And this book is the best companion you can have to explore Unix.
The book covers a lot of territory. Starting with a good introduction to the Unix command line, it covers Unix tools like sed and awk, shell scripting, system programming with C. It even covers lex and yacc. Never mind, the books age - it's still the best computing book I've ever read and I will gladly recommend it for any one new to Unix.
The authors' writing style is excellent. There is a certain amount of dry humor that I grew to appreciate in subsequent readings. For example, about AWK's name, the commentary dryly says "naming the program after the authors' names shows a certain poverty of imagination"! Remember that Brian Kernighan (one of the book authors) is one of the creator's of AWK. Go and buy this book. NOW.
on November 2, 2003
Dated, yes. But that's the only weakness of this excellent book, which covers the philosophy and structure of userland in Unix, and it's not an important one -- nroff is still necessary for man pages, and life on the command line is something anyone dealing with a Unix box should get used to, whether the user is using a shell account on their local freenet or a cutting edge Athlon64 Linux PC or PowerMac G5. (Or even SCO, if you must.)
The tools covered are timeless ones -- make, lex, yacc, and others that are still important for software development some twenty-five to thirty years after they were first written. There's no networking, no Perl, and the shell language is ancient, but what's in there still works, with only minor changes to accomodate ANSI C (if you're using GCC, even that can be dispensed with using a compiler flag). The book also serves as an education in programming language design, working out a full programmable calculator system called hoc, and an introduction to the concept of toolsmithing.
This book and Kernighan's book Software Tools (coauthored with P.J. Plauger) provide a great education in how to build a computer system; there's a very good reason both books are still in print after many, many years when most computer books turn over editions every year or two. Whatever your Unix is -- Mac, Linux, Solaris, BSD, whatever -- take this book with you when you start hacking around on the command line. It's not everything you'll ever need to know, but it's one of the best to get you started.
on May 30, 2002
How is it that a book from 1984 based on a legacy Unix system, describing some tools that no one would now use, can still not only be in print but actually recommended?
In introducing you to the Unix system, from simple shell commands, to shell scripts, to awk and sed programming, and to Unix applications programming, not to mention the best introduction to lex and yacc, the authors develop real applications and teach you how to THINK in Unix terms: develop small components that fit and interact with each other to build larger and larger and more complex applications.
But it's more than just thinking in Unix terms: it's how to structure and approach programs and scripts no matter what environment you are in.
Stevenson's _Advanced Programming In the Unix Environment_ is an excellent book for coverage. I have it too. But _The Unix Programming Environment_ is a book for developing your software mentality in a way that no other book that I've read even approaches.
After 20 years as a Unix programmer, including kernel development of several Unix operating systems, this book still remains on my shelf.
on October 17, 2001
Elsewhere on Amazon I reviewed Kernighan's "Elements of Programming Style." To quote one paragraph from that review -
Brian Kernighan has co-authored three books almost essential to learning our craft, this volume, "Software Tools" and "The Unix Programming Environment". "Elements of Programming Style" spells out the fundamental rules, "Software Tools" shows you how to apply them to a number of simple projects and extends the rules to software design and finally "The Unix Programming Environment" shows you how to use them in an operating system designed to reward you for your effort.
This volume starts with a short, excellent preface detailing some of the early history of Unix and explaining the structure of the book and the philosophy behind it . The preface states "Our goal in this book is to communicate the UNIX programming philosophy ... throughout runs the themes of combining programs and of using programs to build programs." It delivers on that goal.
The book then follows with a series of chapters that start with basic shell commands and then pipes before branching out into shell programming and going on to explore useful Unix tools such as grep, sed, awk, C, the standard libraries, make, yacc and lex through a series of small useful programs culminating in a small calculator language called 'hoc' - a useful calculator and easily extensible.
While most might feel that grep, sed, awk and shell programming have been replaced by tools such as Perl and Python these early chapters provide a good grounding in Unix programming and remind newer users of the power and usefulness of these simple Unix tools.
Briefly covered in a final chapter are some of the document preparation tools based on troff - the macro packages ms, mm and of course the man package used for Unix man pages along with tbl and eqn for tables and mathematical equations respectively.
In totality it provides an excellent grounding in writing good, workable software for Unix. The writing is clear and concise, the volume well laid out, the examples are in the main useful, though a few rely on multiple users of the one machine, not as common now that Linux and Sun have made a Unix computer more of a desktop machine than a minicomputer.
This is a classic book and I would recommend it to all starting out Unix programming, regardless of your experience with other operating systems. Ignore it's age, computer books are rarely this good and almost never this timeless.
on January 23, 2001
Albeit this book was published in 1984 and when I started learning UNIX some ten years later, many of minor details were already a bit out-of-date, I believe that it will still be a marvel for those who work on modern UNIX/Linux systems, since the details are ever changing, the commands may differ from system to system, but the philosophy behind the UNIX technology stays the same, and this is what this book is all about. Written in a great style, resembling to that of another Kernighan's famous book "C programming language", compact and clear, this book is a true classic, one of (unfortunately) very few examples of long living technical books in our rapidly changing world. In short, it's highly recommended for those of fledging programmers or sysadmins who feel that UNIX is too cumbersome and messy to understand; it suits well for beginners and intermediates, who want to feel at UNIX as at home. And don't be scared with some out-of-date details: they are really minor... view them as UNIX history ;-)
on July 20, 2000
Merely half an inch thick, and employing the same cover design - or lack of it - as the C Programming Language, this is probably the least pretentious looking book on my bookshelf. However, the look is misleading - there are very few books, regardless of length, that aim to teach you as much as this one, and even fewer than succeed in it.
Unix programming environment might sound a rather ambitious title nowadays, when a tutorial on each specialized tool can easily exceed 400 pages. However, this one actually delivers everything that it promises. Kernighan and Pike start with the basic description of Unix file system and the basic set of commands, continue with the command shell, redirection and piping. Next come the filters: regular expressions, grep, sort, sed and awk. At that point, the reader is ready for the full-fledged treatment of the command shell programming. Next come standard I/O and Unix system calls, followed by the program development tools: make, lex and yacc. The course is concluded with a chapter on document formatting with troff.
The chapters on I/O and system calls imply familiarity with the C programming language. The already mentioned tutorial on C by Kernighan and Ritchie, written in much the same style and spirit, can serve as the introduction to it. Also, while the book keeps up with its age remarkably well, there are some points where the described Unix system differs from the modern POSIX systems (most user commands are however backward compatible and still accept the old syntax). The required changes are really minor, but can nevertheles annoy an innocent reader.
The book belongs to nowadays rare breed of books on computers written for engineers and CS students rather than for dummies and idiots. Although primarily written for individual study, it can be used for one-semester course on Unix (like in C Programming Language, the exercises are lacking solutions, though). I would love to see it made-up with POSIX syntax and generally reflecting the changes made to Unix during the past 15 years.
on January 21, 2004
This book is one of the cornerstones of the Unix philosophy. "There's a philosophy?" I hear you ask. Ohhh yessss. Unix gives you the tools to build whatever you want and asks only that you behave nicely, reading standard input and writing to stdout. Problem is, the tools sometimes seem too small to get anything useful done. What can you do with tiddlers like ls, cp and diff after all?
This book answers those concerns by a series of examples. My favorite is the version control system implemented in diff. Yes, it's dated, but the quality still shows. I prefer to think of it as "old-school"; it shows just how much can be accomplished with talent and an understanding of the Unix Way.
on May 20, 2003
This is very good book to begin with. It gives you all you need to know about UNIX to start with (requires C and some *NIX knowledge). It covers most of the areas of C and shell programming, however I don't think this book will be sufficient for all your needs and code is very-very confusing it takes a lot of time to figure it out...
I would highly recommend this book for someone that has some basic knowledge in UNIX and need fast intro (also great as the text book). This book will give you a good idea about everything in *NIX, but ones you done with it, you will want to buy another book.
P.S: I would give it a 5 stars if code would be written in less confusing manner.
on November 16, 2000
This is the book that turned me on to UNIX. Actually at the time I read this book, I was burned out on computer programming in general and was thinking about moving into physics. Then I read this book. It illustrated very clearly the power and elegance of UNIX. As a result I regained my interest in computers, which in retrospect, turned out to be a very good thing.
Unfortunately this book is System V-centric and doesn't say much about the improvements introduced by BSD, let alone gnu tools or linux. It was actually out of date at the time I bought it back in 1990. I'm still giving it 5 stars though because it's one of the best books I have read.
on January 28, 2000
This is my favorite book on Unix tools. It is written in a readable style, but it is not easy. The exercises really challenge your understanding. You will be pushed to develop more than just a mediocre grasp. The grep exercise is a good example.
It does not stand on its own because of its age and the older tools that are used. ed is a good example. The book uses ed as its text editor and even has a chapter on ed. I have never met an ed user. It would be easy to conclude that there is no reason to bother with ed. But because the Unix system evolved around ed, learning ed syntax is directly applicable to vi, sed, and perl.