Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!princeton!phoenix!subbarao From: subbarao@phoenix.Princeton.EDU (Kartik Subbarao) Newsgroups: comp.unix.questions Subject: Re: easy question: how to redirect stdin and stderr in sh? Keywords: redirection sh Message-ID: <2742@idunno.Princeton.EDU> Date: 22 Sep 90 22:36:41 GMT References: <750@inesc.UUCP> Sender: news@idunno.Princeton.EDU Lines: 34 In article <750@inesc.UUCP> jmc@inesc.UUCP (Miguel Casteleiro) writes: >The subject says it all! I want to redirect to a file in shell >(/bin/sh) the stdin and stderr of a process. >So, how do I do it? Arrgh! This was covered just a few days ago -- even then, its in the Frequently Asked Questions list which should be consulted before posting! Even better, the bourne (/bin/sh) man pages! use process > stdoutfile to redirect only stdout process 2> stderrfile to redirect only stderr process > stdoutfile 2> stderrfile to redirect both separately process > stdoutanderrfile 2>&1 to redirect both together __ /// Maybe you should spend some more>"News: so many articles, \\\/// Only time!> so little time..." \XX/ Amiga ^^^^^^^^^^^^^ I guess if you restrict yourself to such toys, you can't learn much else. ;-) -Kartik (I need a new .signature -- any suggestions?) subbarao@{phoenix or gauguin}.Princeton.EDU -|Internet kartik@silvertone.Princeton.EDU (NeXT mail) -| subbarao@pucc.Princeton.EDU - Bitnet