Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!pacbell.com!ucsd!mvb.saic.com!ncr-sd!ncrlnk!ncrstp!npdiss1!mercer From: mercer@npdiss1.StPaul.NCR.COM (Dan Mercer) Newsgroups: comp.unix.shell Subject: Re: Named pipes and stdin and stdout question Message-ID: <801@npdiss1.StPaul.NCR.COM> Date: 21 Dec 90 18:35:43 GMT References: <8720010@hpdmd48.boi.hp.com> Reply-To: mercer@npdiss1.StPaul.NCR.COM (Dan Mercer) Organization: StPaul Lines: 31 In article <8720010@hpdmd48.boi.hp.com> oscarh@hpdmd48.boi.hp.com (Oscar Herrera) writes: :I have a program that takes input from the keyboard and reports status :to the screen. I'd like to run this program such that its standard :input comes from a named pipe and its standard output is sent to another :named pipe. Is this possible ? Or, does is it necessary that the :program programatically read/write from/to named pipes ? : :Oscar Herrera Pipes block until they are opened at both ends. Named pipes are no exception. I have written programs that run in background sitting on an open (tvp - turbo vi pattern importer - I start it up in background from my .profile. In vi, I type in a line of code, for instance :stty hit Pf7, which sends the data to in input FIFO. Tvp opens the fifo and reads the current line from the vi file. Vi then opens the output fifo with a :r command. That blocks vi. The 'stty' string is run through an in memory database, matches against an array of entries, and the matched data - all the necessaries to run character at a time termio functions - are written to the output fifo and wind up in my file.). I've also written shell scripts that run 'bc' - the interactive desk calculator - in the background. -- Dan Mercer NCR Network Products Division - Network Integration Services Reply-To: mercer@npdiss1.StPaul.NCR.COM (Dan Mercer) "MAN - the only one word oxymoron in the English Language"