Try Pro free

The Peterman Pod · 4 min · Oct 26, 2026

Awk combined three researchers’ interests in a weekend build

Awk combined three collaborators’ interests in regex, databases and numeric text; Peter Weinberger built it in a weekend with Lex and Yacc.

In this episode

Full analysis
  1. 16:33Bell Labs judged research over years, not weekly output4 min
  2. 54:06Princeton expects computer science majors to fall sharply4 min
  3. 39:38C succeeded by balancing efficiency and expressiveness3 min
  4. 27:55Ken Thompson built a Unix system in three weeks6 min
  5. 43:59Awk combined three researchers’ interests in a weekend build4 min
  6. 1:11:12AI-generated code still needs expertise to verify6 min
  7. 1:19:54C ran fastest in Kernighan’s language comparison3 min
“we came up with a sort of language design and then peter went off one weekend to build it.”
Brian Kernighanat 45:15 · The Peterman Pod
45:15

Takeaways

  1. Awk brought regular expressions, database ideas and numeric text together.
  2. Weinberger used Lex and Yacc to build it over a weekend.
  3. Many Unix tools began with a creator’s own recurring need.

About this segment

Awk combined three collaborators’ interests in regex, databases and numeric text; Peter Weinberger built it in a weekend with Lex and Yacc. The tool grew from problems its creators had themselves.

Brian Kernighan

Brian Kernighan is a former Bell Labs member of technical staff and co-author of the original C book.

Co-authored The C Programming Language and helped develop influential programming tools, including awk.

  • Ryan Peterman, Host · Host, The Peterman Pod

    Went from new grad to staff engineer at Instagram in three years.

From “Brian Kernighan: Inside Bell Labs, The Best Programmer, Why C Won”, Oct 26, 2026. Watch the full episode

Transcript

Transcribed by machine (Whisper) from the episode’s audio, so a word may be off here and there.

  1. 44:03

    So this is back in the mid-70-ish time, 76, 77, I guess. Al Aho and I had been friends for a long time. I mean, he went here at Princeton. He and I were undergrads at Toronto, although he was always a year ahead of me. And he was very interested in regular expressions, seeing patterns of text that you could use to recognize interesting stuff. I had been fooling around pretty unsuccessfully with the idea of some kind of text editor that would let me manipulate numbers as well as text, you know, something like that. And Peter Weinberger, who I don't remember exactly how we met him, was interested in database kinds of things. And so we sort of talked back and forth and came up with this language, which combined some of those interests the regular expression stuff from al um the database flavor and report generation like rpg

  2. 45:06

    from peter and the sort of wouldn't it be nice if strings and numbers were kind of treated were both first class citizens of whatever we were doing so we thought about it for a while and then if a memory serves we came up with a sort of language design and then peter went off one weekend to build it. Peter's an extremely good programmer too, but he had the advantage of tools at that point because he could define the grammar with YACS, the compiler compiler that Steve Johnson had built, and the lexical part with Lex, the lexical analyzer generator that Mike Lesk had built. And so from that, building a language was not as much work as it would have been otherwise there was some just more of it was kind of built for you um and al had the regular expression code already because that came from egrep

  3. 46:03

    can you take this one very very good programmer over a long weekend or so and you've got a language oh and then from there we just sort of evolved it slowly and then uh al and peter dropped away from actual active maintenance probably five ten years later and i sort of inherited it a lot of these unix tools that everyone takes for granted is that usually the story behind them which is you guys are all using unix and then you just realize oh i i want to be able to pipe this to something that diffs or i want to be able to find something and uh and then you guys just build it is that usually how these come about i think a lot of them come from that it's not from hypothesizing what somebody else might find useful it's more like what do i need what's kind of bothering me at this point that I could improve if I just had a better tool or

  4. 46:54

    language or something. And, and I think that's true on almost all of the little tools that you mentioned. It's, you know, gee, I don't want to do this by hand or existing programs aren't quite right. Let me build something new and be very easy. For example, make, which Stu Feldman did, You know, somebody told me, oh, my program didn't work. I can't figure out why it didn't work. Oh, it's because I forgot to recompile one of the files.

  5. 47:26

    And so could you in some way automate that? And that's another one of these weekend projects that, well, Stu did. And then, boy, within a few days, he's got a bunch of users. And then all of the mistakes he made in his first design, he can't fix.