Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.wizards Subject: Re: Detecting Pipe Using Bourne Shell Message-ID: <16799@mimsy.UUCP> Date: 8 Apr 89 05:58:44 GMT References: <18992@adm.BRL.MIL> <8385@xanth.cs.odu.edu> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 26 In article <8385@xanth.cs.odu.edu> kremer@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@mimsy.umd.edu Path: uunet!mimsy!chris