Subject: Re: cat(1) question: multiple "-"s
To: Johnny Billquist <>
From: Steven M. Bellovin <>
List: netbsd-users
Date: 04/18/2006 13:36:40
On Tue, 18 Apr 2006 19:31:13 +0200, Johnny Billquist <>

> Doh! And as others have already noted later, zsh don't do anything like 
> this. It just concatenates the files, and feed the result to stdin.
> Hmm, I wonder if it wouldn't be possible to simulate eofs on a stream, 
> but then present more data. I believe that is what really would be 
> neccesary.
> Thinking of it, I don't think that it's possible. The only stream that I 
> know, that can do this, are ttys. Anyone?
If we had streams, and if pipes were streams, it could be done quite
easily -- make sure there's a 0-length record present.  Otherwise, it's
not particularly easy.  It would take a kernel multiplexor that you handed
several files -- more likely, several file descriptors -- that would read
the first until it ended, give EOF, then the next, etc.

		--Steven M. Bellovin,