From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Message-id: From: dave.l@mac.com To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-reply-to: Date: Sat, 14 Nov 2009 11:27:29 +0000 References: Subject: Re: [9fans] rows to cols? Topicbox-Message-UUID: 9bcb77d4-ead5-11e9-9d60-3106f5b1d025 > It's the sort of thing I used to give as an exercise to students. Wish I'd been in your class. > Explicit looping looks so strenuous. I know: I kept thinking "map ... join": too much perl. > To make the tr|pr method more general, you can count columns first > with But that's multi-pass:-). You could of course, use one pass of wc to count the words and lines, then divide words by lines to get cols:-). There are too many mad genius coders on this list. Next: count the number of angels dancing on the head of a pin using an acid function. Can we talk about plan9 now, please? D