Detecting Pipe Using Bourne Shell
Chris Torek
chris at mimsy.UUCP
Sat Apr 8 15:58:44 AEST 1989
In article <8385 at xanth.cs.odu.edu> kremer at cs.odu.edu (Lloyd Kremer) writes:
>You are trying to interpret "no arguments" as two entirely different
>directives:
>a) present menu and exit
>and
>b) read stdin instead of argument list for search targets
>
>You must devise a way of differentiating between these meanings.
Correct analysis, and a workable solution. However:
>Many UNIX(tm) programs treat an argument of - as meaning 'read
>stdin instead of files'.
what is really needed here is /dev/stdin. Alas, neither SysV (at least
SysV R 1, 2, 2.2, for 3B2, 3B5, Unix-PC, ... how many standards do we
have these days anyway? :-> ) nor BSD (at least I can count the BSD
revisions <-: ) come with a /dev/stdin.
The trend (as shown by /dev/fd/*, /proc, network file systems, and
so forth) seems to be to put everything that is visible into the file
name space ... and I think it is the right trend. (Too bad about
S3 shm and BSD sockets.)
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain: chris at mimsy.umd.edu Path: uunet!mimsy!chris
More information about the Comp.unix.wizards
mailing list