From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from minnie.tuhs.org (minnie.tuhs.org [45.79.103.53]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 6b73fdb7 for ; Sat, 18 Jan 2020 15:45:41 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id E761C9C10F; Sun, 19 Jan 2020 01:45:39 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 2893F9BDD8; Sun, 19 Jan 2020 01:45:25 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 26A919BDD8; Sun, 19 Jan 2020 01:45:24 +1000 (AEST) Received: from neener.bl.org (neener.bl.org [50.116.26.109]) by minnie.tuhs.org (Postfix) with ESMTP id D291A9BD25 for ; Sun, 19 Jan 2020 01:45:22 +1000 (AEST) Received: from neener.bl.org (localhost [127.0.0.1]) by neener.bl.org (8.15.2/8.15.2) with ESMTPS id 00IFjMUh011919 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sat, 18 Jan 2020 09:45:22 -0600 (CST) Received: from localhost (mparson@localhost) by neener.bl.org (8.15.2/8.12.8/Submit) with ESMTP id 00IFjMu7012864 for ; Sat, 18 Jan 2020 09:45:22 -0600 (CST) X-Authentication-Warning: neener.bl.org: mparson owned process doing -bs Date: Sat, 18 Jan 2020 09:45:22 -0600 (CST) From: Michael Parson To: The Eunuchs Hysterical Society In-Reply-To: Message-ID: References: <202001121343.00CDhYHK132101@tahoe.cs.Dartmouth.EDU> <202001122034.00CKYQ39571239@darkstar.fourwinds.com> <202001122044.00CKiUNV573279@darkstar.fourwinds.com> <202001122137.00CLbMrw582813@darkstar.fourwinds.com> User-Agent: Alpine 2.21 (NEB 202 2017-01-01) X-Marks-The-Spot: --->X MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (neener.bl.org [127.0.0.1]); Sat, 18 Jan 2020 09:45:22 -0600 (CST) Subject: Re: [TUHS] Tech Sq elevator (Was: screen editors) [ really I think efficiency now ] 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 Mon, 13 Jan 2020, Dan Cross wrote: > > [Resending as this got squashed a few days ago. Jon, sorry for the > duplicate. Again.] > > On Sun, Jan 12, 2020 at 4:38 PM Jon Steinhart wrote: >> Many people have claimed, incorrectly in my opinion, that this model >> fails in the modern era because it only works on text data. They >> change the subject when I point out that ImageMagick works on binary >> data. And, there are now stream processing utilities for JSON data >> and such that show that the UNIX model still works IF you understand >> it and know how to use it. > > > Certainly. I think you hit the nail on the head with the proviso > that one must _understand_ the Unix model and how to use it. If one > does so, it's very powerful indeed, and it really is applicable more > often than not. But it is not a panacea (not that anyone suggested it > is). As an example, how do I apply an unmodified `grep` to arbitrary > JSON data (which may span more than one line)? Perhaps there is a way > (I can imagine a 'record2line' program that consumes a single JSON > object and emits it as a syntactically valid one-liner...) but I can > also imagine all sorts of ways that might go wrong. And here, understanding the model is important, namely, grep is the wrong tool for searching/parsing JSON output. Dealing with JSON from the shell, you should use jq. I've been dragged kicking and screaming into dealing with JSON, and about all I can say about it is, I like it about this >< much more than XML. :) -- Michael Parson Pflugerville, TX KF5LGQ