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=0.5 required=5.0 tests=DATE_IN_PAST_24_48 autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 13537 invoked from network); 16 Aug 2021 10:17:35 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 16 Aug 2021 10:17:35 -0000 Received: from vultr.musolino.id.au ([45.76.123.158]) by 1ess; Sat Aug 14 22:43:04 -0400 2021 Received: from 180.150.114.112 ([180.150.114.112]) by vultr; Sun Aug 15 12:42:38 +1000 2021 Message-ID: <35B558DC319F335898D178053692880D@musolino.id.au> To: 9front@9front.org From: Alex Musolino Date: Sun, 15 Aug 2021 12:12:37 +0930 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: managed structured persistence descriptor XML over WEB2.0 factory configuration interface Subject: Re: [9front] g Reply-To: 9front@9front.org Precedence: bulk > > You don't need to create a new program. Just specify the awk field > > separator regex correctly, i.e. -F ': *'. > > For scripting you do - Plan 9 permits tarded filenames. Well, today I learnt that you can't put tabs in filenames on plan9. I suppose I should be proud that I've not tried such a darstadly act until now. Even supposing ': ' appears in some filenames, the fact that it does *not* appear in MIME types means you can still have AWK do the dirty work. file -m * | awk -F: '$NF ~ /^( *)text|application.x-sh/ { for(i=1;i1) printf FS; printf "%s", $i } printf "\n" }' I know McIlroy says to write new programs but in this case I think a -t option for file(1) would be preferable over nfile, if the above proves to be defeatable.