From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10981 invoked from network); 17 Nov 2021 22:39:59 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 17 Nov 2021 22:39:59 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 9C9209C8AA; Thu, 18 Nov 2021 08:39:56 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id B25EC9C2E5; Thu, 18 Nov 2021 08:37:00 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=iitbombay-org.20210112.gappssmtp.com header.i=@iitbombay-org.20210112.gappssmtp.com header.b="yG+ga5hl"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 918C89C2E5; Thu, 18 Nov 2021 08:36:59 +1000 (AEST) Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) by minnie.tuhs.org (Postfix) with ESMTPS id C3C529C29F for ; Thu, 18 Nov 2021 08:36:58 +1000 (AEST) Received: by mail-qv1-f50.google.com with SMTP id b17so3126578qvl.9 for ; Wed, 17 Nov 2021 14:36:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iitbombay-org.20210112.gappssmtp.com; s=20210112; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=k/yF6caEe/O03bdyuGr3qcDZuJsLZixmN8Uij8fRZx4=; b=yG+ga5hlBLNaXmmyhuRKu0okJqUi0joRyJGKQOVNJxfc0fkeLxk7qcCfcWeX//1X+2 5c+OKN4oFlIFp+adkd0UgvNIFJHRP0WDOFUyjkbLg1TnFjL6nlJL/gVVuiy0MbM3NhrQ F1k9j/wEXLzIPoID8jNUlZrZD1St8wjWKshhdEymSZ0XtkyWlDHu2KeNvYALDRAOUOzM vK8mak0IVF7bcb9WOZ5aW3T1SlpNFjvyIYF086DiZ0HiydSHLXoVoD5HN95xj88N7aqR RFXbDViwZsRGizjkPBaTOEeoeSdDCAqkVrv6KE52hI9xgBPlIrXeFHG9vSPA6zVBmo7n 2oOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=k/yF6caEe/O03bdyuGr3qcDZuJsLZixmN8Uij8fRZx4=; b=LI0KQHPujjCdCWd2tm+cmnYIHlsS3Rlu0zhSw6/gqNsCMMgIjMyu1bMfBu8asKJIsQ bVYMdwpAqJx6bawHzMGSmWY4heQMEvX0bdBdKPV5cYuuLjt46rC2zzKfCfd3jwKgUfYP jG0Oi0fzOLh+BRlOWl4HDSpqWl0YdDrNacectffQc3q9Hk/+UJhNmPd8PDw4RDL7lzBA 0We83H3udpABuRa4N9lCk413pz+InRWz/H3662i5iMYbP58pp9gn+ofhLuAVpDY84Mew iycSBWDPdHcGm4CWa6t3+sqEiuYv80ogLcjAEwQAQPfr4jky771uke0oIwEvgMNzngwG u2Yg== X-Gm-Message-State: AOAM533ymkERKcZfW/g4Vz6Wv+ZrSvHGbWZjC7WRvjIEV+N+5Bg3qdeF z1tqbi3EZhWbgyvJdvRrqgojv7ng9O16XMjs X-Google-Smtp-Source: ABdhPJz84fwX2P2DVCzFoq5tQn4L/pC8k7jZRnqwvyPHT9IB7BA0Tn5HsWP50nnJy6XZW3d0eP7LkA== X-Received: by 2002:a05:6214:508f:: with SMTP id kk15mr58970318qvb.3.1637188617616; Wed, 17 Nov 2021 14:36:57 -0800 (PST) Received: from smtpclient.apple (107-215-223-229.lightspeed.sntcca.sbcglobal.net. [107.215.223.229]) by smtp.gmail.com with ESMTPSA id bp18sm659543qkb.39.2021.11.17.14.36.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Nov 2021 14:36:57 -0800 (PST) From: Bakul Shah Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) Date: Wed, 17 Nov 2021 14:36:48 -0800 References: <202111161754.1AGHsGsN929905@darkstar.fourwinds.com> <50F3E958-F0A4-4895-B1BC-41A2644A074A@oclsc.org> To: TUHS main list In-Reply-To: <50F3E958-F0A4-4895-B1BC-41A2644A074A@oclsc.org> Message-Id: <47CE7A59-B66D-4814-A91A-20A95B15C8FC@iitbombay.org> X-Mailer: Apple Mail (2.3693.20.0.1.32) Subject: Re: [TUHS] Book Recommendation [ reallly inscrutable languages ] X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On Nov 17, 2021, at 11:12 AM, Norman Wilson wrote: > > Wasn't Perl created to fill this void? > > Void? I thought Perl was created to fill a much-needed gap. and tcl, rc etc. I just want better builtin support for shell pipelines as they are essentially (flat) list processors! As an example consider something like the following: find . -name '*.[hc]' -type f | \ xargs grep -l '\' /dev/null | \ xargs grep -l '\' /dev/null | \ xargs some-command Just to run some-command on all *.[hc] files with words foo & bar. And this will fall apart if there are spaces or : in filenames. Basically most scripts are about enumerating, filtering, converting and processing. If files, especially text files, are so central to unix, a shell should know about them and provide common operations on them. One can even think of shell variables as files (sort of like the env device in plan9). If you want to name some sub-computation instead of processing it all in one pipeline, it should be trivial but it isn't; you have to find uniq names for these temp files and remember to delete them when done. I want lexically scoped variables (aka files) that disappear once you exist the scope! The difficulty is in coming up with an intuitive, regular & a relatively concise syntax. Even so it would likely be unpopular since people seem to prefer for-loops!