Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!bionet!csd4.milw.wisc.edu!leah!rpi!batcomputer!cornell!rochester!pt.cs.cmu.edu!cadre!pitt!darth!libove!root From: root@libove.UUCP (Jay M. Libove) Newsgroups: comp.unix.questions Subject: Re: C shell question. Message-ID: <216@libove.UUCP> Date: 14 Feb 89 19:18:17 GMT References: <6295@phoenix.Princeton.EDU> Organization: Libove, Pittsburgh, PA, U.S.A. Lines: 26 From article <6295@phoenix.Princeton.EDU>, by prnott@phoenix.Princeton.EDU (Prabhu R Nott): > > I hope this is the right news-group for this question - > Could someone tell me how I can redirect output from standard error > to a file or device? In the Bourne shell, this can be achieved by > command 2>filename, but this doesn't work in the C shell. > Does anyone know what the syntax is? Thanks in advance. No doubt this should be in the Frequently Asked Questions section of the usenet introduction documents... The C shell lacks the ability of the Bourne shell to in one simply command redirect two types of output to two different places, but it provides it in a grosser (word?) way: c-shell% (command > stdout.file) >& stderr.file So that all standard output goes to stdout.file, and error output goes outside of the subshell in which command was executed, and is caught by forcing all output making out of that shell in to stderr.file. -- Jay Libove jl42@andrew.cmu.edu, libove@cs.cmu.edu, 5731 Centre Ave, Apt 3 gateway.sei.cmu.edu!libove!libove, jl42@andrew.BITnet, Pittsburgh, PA 15206 jl42@drycas.BITnet, psuvax1!pitt!darth!libove!libove, (412) 362-8983 or uunet!nfsun!libove!libove