Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uwm.edu!bionet!agate!riacs!loki!dwsmith From: dwsmith@loki.arc.NASA.GOV (David Smith) Newsgroups: comp.unix.shell Subject: I/O Redirection quest. Summary Keywords: redirection stdout stderr Message-ID: <1991Apr16.214259.14169@riacs.edu> Date: 16 Apr 91 21:42:59 GMT Sender: news@riacs.edu Reply-To: dwsmith@loki.arc.NASA.GOV (David Smith) Organization: NASA Ames Research Center Lines: 31 In summary: Problem: Need to capture stdout in a file along with stderr, but also need stdout to go to the terminal for prompting of input. Solution: sh/ksh: (program | tee /dev/tty) > file 2>&1 csh: (program | tee /dev/tty) >& file Thank you to everyone who responded to my question. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ David W. Smith All comments made are my own NASA Ames Research Center and do not in anyway reflect M/S 233-3 NASA opinions or policies. Moffett Field, CA 94035-1000 (415) 604-6555 Internet: dwsmith@ames.arc.nasa.gov ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~