Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bbn!rochester!rocksanne!fuss From: fuss@rocksanne.UUCP (William Fuss) Newsgroups: comp.unix.questions Subject: distinguishing from pipes and files Message-ID: <454@rocksanne.UUCP> Date: Sat, 21-Nov-87 02:30:51 EST Article-I.D.: rocksann.454 Posted: Sat Nov 21 02:30:51 1987 Date-Received: Mon, 23-Nov-87 04:20:39 EST Reply-To: fuss@rocksanne.UUCP (William Fuss) Organization: Xerox Corp., Webster, NY Lines: 39 Keywords: files, pipes Seeing how there has been a lot of discussion about pipes.... I would like to know the following: Can a process can recognize the "source" of its input/output ??? for example, given the scenerio below: (1) foo < input > file2 & bar < file2 > file3 & foobar < file3 > output & (2) cat input | foo | bar | foobar > output Can "bar" figure out that its standard input is coming from: a file in example (1), vs a pipe in example (2), or does the shell take care of things such that they look the same? Any ideas? Any clues? or am I digging a hole that cannot be dug? Any *useful* advice/comments/... appreciated. Please respond via email. Thanks, billfuss ...!rochester!fuss.wbst@xerox.COM ---------------------------------------------------- Smile the world may never know! . . \_/