Xref: utzoo comp.unix.wizards:9106 comp.unix.questions:7410
Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!gatech!ncar!oddjob!mimsy!chris
From: chris@mimsy.UUCP (Chris Torek)
Newsgroups: comp.unix.wizards,comp.unix.questions
Subject: Re: grep replacement and /dev/stdin
Message-ID: <11821@mimsy.UUCP>
Date: 5 Jun 88 21:41:14 GMT
References: <136@rubmez.UUCP> <449@happym.UUCP> <7944@alice.UUCP> <8022@brl-smoke.ARPA>
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
Lines: 22

In article <8022@brl-smoke.ARPA> gwyn@brl-smoke.ARPA (Doug Gwyn ) writes:
>By the way, I hope the new grep when asked to always produce
>the filename will use "-" for stdin's name, and the context
>tool would also follow the same convention.  Even though the
>Research systems have /dev/stdin, other sites may not,

Why not?  We (chris@mimsy.umd.edu and fred@mimsy.umd.edu) have posted
an implementation at least twice.  (Still could not get Berkeley to
include it in 4.3-tahoe, alas; maybe 4.4....)  The implmentation was
easy in 4.1BSD, and not hard in 4.2 and 4.3BSD, so it should be easy in
any pre-networking Unix, and not hard in the networking Unices.  (It
only got harder because Fred wanted to open, not dup, the appropriate
descriptor, and that is not possible for sockets or [presumably] streams.
I believe the V8 /dev/stdin dups fd 0.)

>and anyway (as we've just seen) stdin isn't really a definite
>object.

Neither is `-'.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris@mimsy.umd.edu	Path:	uunet!mimsy!chris