I/O Redirection question

Michael Stefanik mike at bria.UUCP
Mon Apr 15 07:23:28 AEST 1991


In an article, dwsmith at loki.arc.NASA.GOV (David Smith) writes:
|I have a question regarding I/O redirection.  I have a program in which
|writes to stdout and stderr.  I have redirected both of these to a file.
|
|Now comes the problem.  I need to capture stdout in a file along with
|stderr, but I also need stdout to go to the terminal for prompting of
|input.  Is this possible?  If so, how does one do this?

Try:

	$ [someprogram] 2>>somefile | tee /dev/tty >>somefile

-- 
Michael Stefanik, MGI Inc, Los Angeles | Opinions stated are never realistic
Title of the week: Systems Engineer    | UUCP: ...!uunet!bria!mike
-------------------------------------------------------------------------------
If MS-DOS didn't exist, who would UNIX programmers have to make fun of?



More information about the Comp.unix.shell mailing list