Subject: Re: echo foo > /dev/stdout
To: Jan Schaumann <jschauma@netmeister.org>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: netbsd-users
Date: 08/21/2007 22:34:10
On Tue, 21 Aug 2007 19:06:50 -0700
Jan Schaumann <jschauma@netmeister.org> wrote:

> "Steven M. Bellovin" <smb@cs.columbia.edu> wrote:
> 
> > What shell do you use?  As I understand it, /dev/stdout is only
> > available on NetBSD if you mount fdesc (see mount_fdesc(8)).  But
> > ksh fakes it.
> 
> Yes, I do use ksh.  But I had assumed that the existence
> of /dev/stdout as a character device would have been sufficient.
> 
> I also noticed that under FreeBSD /bin/sh this works, but there I do
> happen to have devfs mounted.
> 
> Thanks for clearing that up.
> 
> Interesting, though, that ksh fakes it.
> 
I don't know much about the details of pdksh.  Years ago, though, I was
talking with Dave Korn about some fakery for /dev/tcp/host/port (or
some such; I don't remember the details) versus a small, stupid program
(something netcat-like) that I'd written to do the same thing.  Dave
commented that his shell would be on far more machines than my little
program...  I suspect we're seeing the same thought process here.


		--Steve Bellovin, http://www.cs.columbia.edu/~smb