From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from minnie.tuhs.org (minnie.tuhs.org [50.116.15.146]) by inbox.vuxu.org (Postfix) with ESMTP id C61AF2B859 for ; Mon, 4 Mar 2024 13:00:54 +0100 (CET) Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id B1191436AE; Mon, 4 Mar 2024 22:00:49 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuhs.org; s=dkim; t=1709553649; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=PMEmjgbLWCaYLhj7pEms4WdGtUvv/oqB65QE8dzli+k=; b=ulye/4j44a0BYeZUOst/RyI7GN2v3Ljlj3tuoAFqt3MWNNVqtPn7WqRZKGyJ+cqc3FvQGz QyMNzNK+h6XRvAMXRVolJ7I0d6skfp1TrsI5ZRSpafT12Q2eQjIeU/deNkrI72JmYSSliU +4EISW5Htw/O5EmxilRtyjngWnUqlrE= Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by minnie.tuhs.org (Postfix) with ESMTPS id D75A5436AD for ; Mon, 4 Mar 2024 22:00:39 +1000 (AEST) Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-33d90dfe73cso2272169f8f.0 for ; Mon, 04 Mar 2024 04:00:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709553638; x=1710158438; darn=tuhs.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=PMEmjgbLWCaYLhj7pEms4WdGtUvv/oqB65QE8dzli+k=; b=JY/fzf6S1eLS1e3tqbjGHDX0mnHoZJTd0ip0VhIQV9jsPh9Eo3t7qpK7t1qPJpTTLM V2gxVXe58p8p/cutaHgeIf904YEQCGt3o4nD6tsx7vadjkrcfjU0wkDhX+Hoe1O9fkyg yLAoFdnoOyqrUpQzK78GjJ5QWhj4qpq25ZG2NedczFpZsxUxrUs9xiFeaNBC3eU3qe/x PtRZut2mmsaxlxFS5lFnAoAqgTFwsw57IxIlEAfMpGZvtfyvphAWjCRbFDIx1xvGRdWH pTbxvFrWSPjb7yTMmUR5Ja/J6ltVPFbdTdftYqtFYM8qdrljYnzcEb/SJwjlDpFwbA+X DQ5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709553638; x=1710158438; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PMEmjgbLWCaYLhj7pEms4WdGtUvv/oqB65QE8dzli+k=; b=P8bC3qWvgFJr3DXjjiLd/k+ziml7PTW6pXie4YB54tmPtyobMHpTzdh0/Ckay08M3E t0cYNLHlrSj3dRea2mRImvVO/J12xITj98dI5izgvqN/mNFcd72Y8deZdlDiTQLqUFml G3uoPoi0249f6bovNzUr+y/xKUgDyGFtPwakviPdXVm4LzAZvwh8GySxSVYgWmCYT3jE XEfTPDpan7Viw6WzD/9fFRRajQO+JPLSBtH/oNvUvoV+j/7ZIjAr6+fDeaBsvrgMez03 /zkICrk/nqudp+HTksGNTY+8dFNX4KC+JRWOs/N5IF8BafO2ggjQiYv36RJS63wYeoRN 9R0Q== X-Forwarded-Encrypted: i=1; AJvYcCXuOBA5dukR72VGoW/UQBdvgLYl3P/cZC6uana3EeYyw+DH81W89anfbIs2dkKDy1MGSj4bAyoVSzzYKq5q X-Gm-Message-State: AOJu0YypFdeXMacXlHP2zqA8BciveWX52RCV43W8uC3A3TMP3e+1b3sB 35PkLbACrnqIMU2lu+J9rFeKrCLctr2AT6WNmAbZ6b7DXUw8vU5BfOaZ9eBf1Y/HAKVzaDuF4LQ RY0oZnhlZ3nWuC0i8Uh0NzKqhG3+dDZF5F/mN X-Google-Smtp-Source: AGHT+IGfLPRT7tLIjIVwau/lUMU6H7KRqI5C/LVw7oi2strfLJ6HDsgEjic6rSHqUHTOfrFtoDKv8bOKEImBCqioPng= X-Received: by 2002:adf:b192:0:b0:33e:c9a:558a with SMTP id q18-20020adfb192000000b0033e0c9a558amr9077182wra.7.1709553637677; Mon, 04 Mar 2024 04:00:37 -0800 (PST) MIME-Version: 1.0 References: <13abd764-984a-4c9f-8e3e-b1eb7c624692@gmail.com> In-Reply-To: Date: Mon, 4 Mar 2024 07:00:21 -0500 Message-ID: To: Marc Rochkind Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: RZPNTQT7CCCTONJMME7IQHEYTDAQUTLA X-Message-ID-Hash: RZPNTQT7CCCTONJMME7IQHEYTDAQUTLA X-MailFrom: pjw@google.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Will Senn , TUHS X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: regex early discussions List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?b?UGV0ZXIgV2VpbmJlcmdlciAo5rip5Y2a5qC8KSB2aWEgVFVIUw==?= Reply-To: =?UTF-8?B?UGV0ZXIgV2VpbmJlcmdlciAo5rip5Y2a5qC8KQ==?= my recollection is that awk and sed were contemporaneous. On Sun, Mar 3, 2024 at 9:04=E2=80=AFPM Marc Rochkind = wrote: > > Will, here's my recollection, when I got to UNIX in late 1972 or thereabo= uts: > > First, there was ed. grep and sed were derived from ed, so came along lat= er. awk came along way later. > > There were only manual pages. You typed "man ed" and there it was. The ma= n pages were very accurate, very clear, and very authoritative. Many found = them too succinct, especially as UNIX got more popular, but all of us back = in the day found them perfect. Maybe you had to read the man page a few tim= es to understand it, but at least that's all you had to read. No need to hu= nt around for more documentation! > > (Well, there was more documentation: The source code, which was all onlin= e. But reading the ed source to understand regular expressions was impossib= le. It was in assembler, and Ken was generating code on the fly as the expr= ession was compiled.) > > Also, it should be noted that ed produced a single error message: a quest= ion mark. No wasting of teletype paper! > > The motivation for learning regular expressions was that that's how you e= dited files. ed was the only game in town. > > (sh used a greatly restricted form of regular expressions, which were doc= umented on the sh man page.) > > Marc Rochkind > > On Sun, Mar 3, 2024 at 6:31=E2=80=AFPM Will Senn wr= ote: >> >> Hi All, >> >> I was wondering, what were the best early sources of information for reg= exes and why did folks need to know them to use unix? In my recent explorat= ions, I have needed to have a better understanding of them, so I'm digging = in... awk's my most recent thing and it's deeply associated with them, so h= ere we are. I went to the bookshelf to find something appropriate and as us= ual, I've traced to primary sources to some extent. I started with Masterin= g Regular Expressions by Friedl, and I won't knock it (it's one of the best= sellers in our field), but it's much to long for my personal taste and it's= not quite as systematic as I would like (the author himself notes that his= interests are less technical than authors preceding him on the subject). S= o, back to the shelves... Bourne's, The Unix Environment, and Kernighan & P= ike's, The Unix Programming Evironment both talk about them in the context = of grep, ed, sed, and awk. Going further back, the Unix Programmer's Manual= v7 - ed, grep, sed, awk... >> >> After digging around it seems like folks needed regexes for ed, grep, se= d and awk... and any other utility that leveraged the wonderful nature of t= hese handy expressions. Fine. Where did folks go learn them? Was there a pa= rticularly good (succinct and accurate) source of information that folks ke= pt handy? I'm imagining (based on what I've seen) that someone might cut ou= t the ed discussion or the grep pages of the manual and tape them to their = monitors, but maybe I'm stooopid and they didn't need no stinkin' memory de= vice for regexes - surely they're intuitive enough that even a simpleton co= uld pick them up after seeing a few examples... but if that were really the= case, Friedl's book would have been a flop and it wasn't :). So seriously,= if you remember that far back - what was the definitive source of your reg= ex knowledge and what were the first motivators for learning them? >> >> Thanks, >> >> Will > > > > -- > My new email address is mrochkind@gmail.com