From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Stalker To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-reply-to: <13426df10910051922h6d40c1b2u5a8481db9a2a9b64@mail.gmail.com> References: <20091005192428.GA24445@nipl.net> <200910052204.aa92451@salmon.maths.tcd.ie> <13426df10910051922h6d40c1b2u5a8481db9a2a9b64@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <421.1254811239.1@kryten> Date: Tue, 6 Oct 2009 07:40:39 +0100 Message-ID: <200910060740.aa94573@salmon.maths.tcd.ie> Subject: Re: [9fans] mishandling empty lists - let's fix it Topicbox-Message-UUID: 805ecbb8-ead5-11e9-9d60-3106f5b1d025 > I prefer my version to your versions. I can see uses for them already. > > ron So do I, though I'm not sure I would have called the latter "my" versions. That's not the point however. Since I don't seem to been have sufficiently clear, I'll reword it a bit: There are a lot basic UNIX/p9 utilities which treat empty lists inconsistently. It would be nice if there were fewer, but you can't arrange that without breaking many things. The list I gave was what you would get by looking through /bin on a BSD system and making empty lists behave like other lists, just empty. Most of your list would, in fact, be more useful, but of of course break even more existing scripts. I think you got one wrong, however. >> `cat' would concatenate 0 files, i.e. ouptut nothing, >cat would copy stdin to stdout How do you perform the original, concatenating, function of cat with this version? With "my" version I can type `cat -' or at worst `cat /dev/fd/0' to replicate the behaviour of "your" version. An idea more along the lines of your others would be that cat reads a list of files on stdin and concatentes their contents to stdout. -- John Stalker School of Mathematics Trinity College Dublin tel +353 1 896 1983 fax +353 1 896 2282