
The UNIX programming environment
by Brian W. Kernighan · first published 1984
215mentions
86recommended by
136HN commenters
2007–2026first – last mentioned
62% recommend36% neutral1% critical
Why HN recommends it
Concise, easy-to-read tour of the Unix shell, awk, and small composable tools, showing how to build useful programs from them; suits new Unix users and programmers wanting the Unix philosophy.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.








Mine is currently The Unix Programming Environment, Kernighan & Pike, 1984. https://en.wikipedia.org/wiki/The_Unix_Programming_Environment (Ahh ... blue on white book covers.) It's a pretty good substitute for Unix Power Tools, although obviously much…
on “What is your current “bathroom book?”” ↗…Calculus - Spivak How to Solve It - Polya The Design and Implementation of the 4.4 FreeBSD Operating System - McKusick, Bostic, Karels, Quarterman The Design of the Unix Operating System - Bach The Unix Programming Environment - Kernighan, Pike The Art of Unix Programming - Raymond Godel, Escher, Bach - Hofstadter Metamagical Themas - Hofstadter Joel on Software - Spolsky Code Complete - McConneli The Mythical Man-Month…
on “ASK HN: Hacker Bibles” ↗…http://www.amazon.com/Programming-Addison-Wesley-Professiona... http://www.amazon.com/Paradigms-Artificial-Intelligence-Prog... http://www.amazon.com/Structure-Interpretation-Computer-Prog... http://www.amazon.com/Unix-Programming-Environment-Prentice-... http://www.amazon.com/Programming-Environment-Addison-Wesley... To me, the kind of approach pictured in the post, seems like copying methods from electrical or civil engineering to appear…
on “Teaching Software Architecture with GitHub” ↗While I think it's a neat idea - I think in the end it's gunna be a case of in-one-ear out-the-other. For instance I read all of "The Unix Programming Environment" by Kernighan and Pike. It's FULL of useful information (in fact I'd argue it's way better than reading man pages) and after I was done I felt like I was 10 times the Linux man I was. However unless you're…
on “2013 Resolutions: a man page a day makes the newb go away” ↗…need to know". This probably comes from learning Unix via graphical interfaces, such as GNOME on Ubuntu, OS X, etc., and blog posts by other people with the same background. Kernighan and Pike's _The Unix Programming Environment_ is probably still the best place to learn this stuff.
on “Linux command line techniques: IO redirection and piping” ↗…9"), slice (read given 4kb chunk numbers from file, via mmap), and dozens of little scripts. I don't really care for shell scripting, but awk is great. If you want more stuff like this, check out _The Unix Programming Environment_ and _The Awk Programming Language_. Both co-written by Brian Kernighan.
on “Data Science Hand Tools: Unix Power tools Revisited” ↗The "Unix Programming Environment" book by Kernighan and Pike is still the best source for a UNIX command line "course". I love the elegance of this book, I learned most of what is in it already by "osmosis" before buying it, still love…
on “The Command Line Crash Course” ↗…If you are using ad hoc regex I suspect you are not using all the tools available to you. I feel like Kernighan and Pike do a much better job of explaining than I could ever. https://www.amazon.com/Unix-Programming-Environment-Prentice...
on “PowerShell is open sourced and is available on Linux” ↗This instantly brought to mind the classic 1984 book, The Unix Programming Environment, by Brian Kernighan and Rob Pike [1]. Note that they call Unix a programming environment, not an operating system. This book shows that the original purpose of Unix is to be a tool for writing software.…
on “Unix as IDE” ↗…meaning of your few lines immediately below it, including the one that says "McIlroy’s solution is genuinely shell:". Try to see the similarity/difference/contradiction. [1] Finally, read the book The Unix Programming Environment, a classic, by Kernighan and Pike (Unix pioneers). I cut my Unix teeth on it, years ago, although, of course, years do not mean I am right and you are wrong. Facts do. There are chapters in the book on…
on “The hard part in becoming a command line wizard” ↗What's your aim? If you've K&R are you trying to learn C? If you want to learn the Unix philosophy then get Kernighan and Pike's _The Unix Programming Environment_. If you want to create a web start-up, learn Python and Django. What skills do you already have?
on “I'm new to Linux. I've got Ubuntu and K&R. Now what?” ↗Congrats! If you haven't yet, check out _The Unix Programming Environment_ and _The Practice of Programming_, both by Rob Pike and Brian Kernighan (K of K&R). They're concise, highly informative books about using the Unix toolset to their maximum potential. The former was written…
on “Shoestring Budget? Starting to feel growth issues on your back-end? Embrace unix and C” ↗For learning this side of Unix, I've found the following very helpful (note that this is a bit BSD-centric): 1. _The Unix Programming Environment_ by Kernighan and Pike. The best overall intro to the pipes, shebangs, and other assorted command line stuff in Unix. Very old school, but still very relevant - those are the root of many of Unix's strengths.…
on “* is Unix” ↗Work all the demonstrations and exercises in Kernighan and Pike's Chapter 8 of "The Unix Programming Environment". Less than 60 pages in a friendly large font. You'll be glad you did.
on “Rich Programmer Food” ↗…to Web Publishing Grune and Jacobs, Parsing Techniques: A Practical Guide Daniel Hillis, The Connection Machine Kernighan and Pike, The Practice of Programming Kernighan and Pike, The Unix Programming Environment Kernighan and Plauger, Software Tools in Pascal Donald Knuth, Literate Programming Glenn Krasner (editor), Smalltalk-80: Bits of History, Words of Advice Susan Lammers, Programmers at…
on “Which programming book you just couldn’t stop reading from start to end?” ↗