# Awk combined three researchers’ interests in a weekend build

Markdown copy of https://realalpha.app/s/awk-combined-three-researchers-interests-in-a-weekend-build/ on Real Alpha, the best minutes from long interviews with the people building AI. Cite and link the page, not this copy.

- Speaker: [Brian Kernighan](https://realalpha.app/people/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.
- Host: [Ryan Peterman](https://realalpha.app/people/ryan-peterman/) · Host, The Peterman Pod · Went from new grad to staff engineer at Instagram in three years.
- Show: The Peterman Pod
- Episode: [Brian Kernighan: Inside Bell Labs, The Best Programmer, Why C Won](https://realalpha.app/v/sMllOlxVgD0/), Oct 26, 2026
- Moment: 43:59 to 47:45 of the episode (4 min), playing on https://realalpha.app/s/awk-combined-three-researchers-interests-in-a-weekend-build/; the episode from there: https://realalpha.app/v/sMllOlxVgD0/?t=2639

## Quote

> “we came up with a sort of language design and then peter went off **one weekend to build it**.”
> — [Brian Kernighan](https://realalpha.app/people/brian-kernighan/) at [45:15](https://realalpha.app/v/sMllOlxVgD0/?t=2715) · The Peterman Pod

## 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.

From “Brian Kernighan: Inside Bell Labs, The Best Programmer, Why C Won”, Oct 26, 2026. [Watch the full episode](https://realalpha.app/v/sMllOlxVgD0/)

## Transcript

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

[44:03](https://realalpha.app/v/sMllOlxVgD0/?t=2643) 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

[45:06](https://realalpha.app/v/sMllOlxVgD0/?t=2706) 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

[46:03](https://realalpha.app/v/sMllOlxVgD0/?t=2763) 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

[46:54](https://realalpha.app/v/sMllOlxVgD0/?t=2814) 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.

[47:26](https://realalpha.app/v/sMllOlxVgD0/?t=2846) 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.
