On Thu, 14 Sep 2000, John Baldwin wrote:

> Poul-Henning Kamp wrote:
> > In message <[EMAIL PROTECTED]>, Peter Pentchev writes
> > 
> > I must admit that I think in general that /dev/std{in,out,err} and /dev/fd
> > is bogus.  It looks like something which happened "because we can" more
> > than something which has a legitimate need.
> How about the fact that the printing chapter in the Handbook uses /dev/fd/0
> in its example of setting up a print filter using ghostscript since gs
> doesn't read from stdin by default or use '-' for that purpose.  Hmmm??

Actually, I think it should be the other way around:  if anything should
go, it's the use of '-' in programs/scripts.  The only advantage is that
it saves keystrokes.

I agree, /dev/std{in,out} is a very neat and elegant way of working with
stdin/out.  If anything is the kludge, it's '-', and it's really vague as
to what it means.  With /dev/std{in,out}, there's no doubt as to what's
going on with file ops.  Plus, it's the unix way (tm) of doing
things.  Almost all Unices have this, don't they?  This means there's
likely to be some cross-platform shell scripts that use those things.

- Donn

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to