[comp.unix.questions] grep replacement and /dev/stdin

chris@mimsy.UUCP (Chris Torek) (06/06/88)

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

allbery@ncoast.UUCP (Brandon S. Allbery) (06/14/88)

As quoted from <11821@mimsy.UUCP> by chris@mimsy.UUCP (Chris Torek):
+---------------
| 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
+---------------

Sigh.  Not all sites on the Usenet are 4.xBSD source sites, much less all
Unix sites.  Ncoast is System III, telo1000 is System V.3.1.  Neither will
run your BSD version, and while ncoast can have device drivers added it's a
pain in the butt to do.  And some sites may not have a means of adding
device drivers at all.
-- 
Brandon S. Allbery			  | "Given its constituency, the only
uunet!marque,sun!mandrill}!ncoast!allbery | thing I expect to be "open" about
Delphi: ALLBERY	       MCI Mail: BALLBERY | [the Open Software Foundation] is
comp.sources.misc: ncoast!sources-misc    | its mouth."  --John Gilmore