
Unix text processing
by Dale Dougherty, Tim O'Reilly · first published 1987
55% recommend45% neutral
Why HN recommends it
Covers the Unix text tools in practical depth, including the shell, awk, and the roff family with eqn, tbl and pic; useful for learning the concepts and for working with troff and macro packages.
Summarised by Claude from recommending comments
from the original back cover blurb: Today, writers not only work with words, they work with computers and the software programs, printers, and terminals that are part of a computer system. UNIX Text Processing reveals how computers can be used effectively in the preparation of written documents, particularly major book-length projects. The useful tools and techniques featured in UNIX Text Processing can help you unlock the resources and power of a computer system to tackle such writing projects as technical manuals, reports, and proposals. In these pages, you'll learn: * What's
Affiliate links. As an Amazon Associate I earn from qualifying purchases.


I have occasionally dipped into this book for instruction and consider it a freely accessible reference: Unix Text Processing, Dougherty and O'Reilly, 1987 https://www.oreilly.com/openbook/utp/ Cherry pick chapters like those on the Shell and AWK, and avoid those on troff, macros etc unless specifically interested.
on “Bringing the Unix philosophy to the 21st century (2019)” ↗A great deal can be learned from Unix Text Processing, by Dale Dougherty and Tim O'Reilly (1987) not just about troff, but the other Unix utilities in action, not just man pages or snippets. And all the quoting you need to do! TO'R has made it available…
on “Use Troff – a set of macros and tools to use troff efficiently (2018)” ↗Not very modern, but still a learning tool, Unix Text Processing [0] taught me tons about unix commands and utilities. It provided a foundation for things to come. Even if it's heavily into troff (we had DWB on the work computer) the shell, awk, sed and other commands…
on “The 800 page book that made me a web dev” ↗A lot of the stuff in it is out of date, but `Unix Text Processing' is a great read, if only to get a feel for the concepts and ideas.
on “Free O'Reilly Books” ↗…whatever. The particular software we used evolved from netlabs and we wrote custom handlers in perl, which Larry Wall invented for exactly that purpose if my history is right. At one point, I read "Unix Text Processing" not so much for the troff lessons, but for all the working examples of shell commands. That helped me enormously in my work. And you can get the book. https://github.com/larrykollar/Unix-Text-Processing…
on “Learning Sed or Using Claude?” ↗Here's an old but good book on Unix Text Processing with nroff/troff and its companion tools eqn, pic, tbl. It explains how to use the tools and how to write your own macro packages for them: https://www.oreilly.com/openbook/utp/
on “Writing my PhD using groff” ↗One of my all-time favorite books which of course I’ve owned multiple times but never read in its entirety: UNIX Text Processing, which covers the roff family in detail, plus eqn, awk, etc. https://www.oreilly.com/openbook/utp/
on “Beautiful Documents with Groff (Part I)” ↗Possibly of interest... https://github.com/larrykollar/Unix-Text-Processing A re-compilation of the book by various contributors coordinated by Larry Kollar. The whole thing compiles in a few seconds on an old Thinkpad (I had to fix a font location warning).
on “Beautiful Documents with Groff (Part I)” ↗Old-timer here. I learned to use the unix built-ins via Unix Text Processing, Unix Power Tools, and UNIX Relational Database Management. The last of these is a commercial version of Walter Hobbs' work at RAND. The code is avalable at github. https://github.com/ironsmith58/RDB…
on “What is the one book that helped you the most in your career?” ↗…known and it's the 13th and no January calendar yet. So, it's like convert date formats, which Numbers refused to do, and then pair that column with days of the week. Before I went back to the days of "Unix Text Processing" and the insanely useful "paste" command. That came from the days when I studied that book and put a ton of it into practice. It was a guide top shell and built-ins via example. Doing this, I thought…
on “The Joy of Not Learning: How AI Saves My Hobby Projects” ↗…available for text editing was ed. (Surprise!) I learned a lot about ed real fast. Though this won't happen again, the lesson is "Learn the basics" I learned a ton about unix command line utils via the "Unix Text Processing" book, not just troff. We had DWB troff later on, and it really was an education for me. I read in various lab data sets and created reports (with plots) in short order while others were repeatedly and…
on “Common patterns in Linux tools that go back to ed(1)” ↗…Either dataflow, event flow or state transition seems to work better. I sometimes wonder if the right way forward would be something a bit like the old "pic" language: https://www.oreilly.com/library/view/unix-text-processing/97... ; SVG is too complex and too XML to cleanly interleave in a program, but pic might work well.
on “Visual Programming Doesn’t Suck” ↗After having a look at: https://www.oreilly.com/library/view/unix-text-processing/97... and a few man pages, I figured I could play with eqn like so: eqn -Tpdf - <<eof | groff -me -T pdf > eqn.pdf .EQ sum from i=0 to infinity x sub i = pi over 2 .EN eof xdg-open…
on “Lorinda Cherry, author of dc, bc, eqn has died” ↗…info. > Man pages are quite limited correct, Incorrect; manual pages are rendered by the nroff document typesetting system. Entire books have been typeset for printing with nroff. Case in point: the UNIX Text Processing book, the AWK book, the ANSI C book. The system is extremely flexible and very powerful, once one understands what is going on. When you hold the printed versions of these books in your hand, you can…
on “CHIP $9 Computer” ↗As it happens, the analogy is from the Unix Text Processing book, page 97: "Mark Horton writes us: I think of ms as the FORTRAN of nroff, mm as the PL/I, and me as the Pascal." Thank you for taking the time to answer these questions! I will plough through some…
on “Unix Text Processing (1987)” ↗