Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!pa.dec.com!wsl.dec.com!tabor From: tabor@wsl.dec.com (Dick Tabor) Newsgroups: comp.unix.shell Subject: capturing stdout and stderr to a pipe in ksh Message-ID: <1991Jun11.181850@wsl.dec.com> Date: 12 Jun 91 01:18:50 GMT Sender: news@pa.dec.com (News) Reply-To: tabor@wsl.dec.com (Dick Tabor) Organization: DEC Western Software Lab Lines: 18 I have a ksh script that invokes a C program. When the C program core dumps the message disappears. The shell script captures all the output and sends it via mail. ( print -u2 "testing to stderr" foo (the C program) ) | mail -s testing tabor I have tried adding a 2>&1 after 'tabor' and before the |, however the core dump message and the testing to stderr never get captured. Thanks in advance for any help. Dick Tabor