Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site unitek.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!vax135!cornell!uw-beaver!ubc-vision!unitek!reid From: reid@unitek.UUCP (Reid Spencer) Newsgroups: net.unix Subject: Re: I/O Redirection with the C Shell Message-ID: <307@unitek.UUCP> Date: Tue, 3-Dec-85 14:45:23 EST Article-I.D.: unitek.307 Posted: Tue Dec 3 14:45:23 1985 Date-Received: Fri, 6-Dec-85 06:31:19 EST Distribution: net Organization: UNITEK TECHNOLOGIES CORPORATION, SURREY, B.C. Lines: 36 [Sigh] Recently (last week), I posted an inquiry for information on how to separate the standard error from the standard output using the C Shell. I have received several messages and there seems to be two solutions - one of which is more popular than the other. I thank all those who took the time to respond. My problem was: How do you redirect the standard error of a job to a different place than the standard output. For example, using Bourne Shell, we would do the following: nroff -ms document >doc 2>index In the C Shell, the solution seems to be: Use brackets to run the job in a sub-shell and redirect the I/O at two different levels: (this is the popular one) (nroff -ms document >doc) >& index Or, using the Bourne Shell: sh -c 'nroff -ms document >doc 2>index' Both versions work quite well - I haven't decided which I like better yet, but I am grateful for all the responses. Thanks again. Reid Spencer ...!ubc-vision!unitek!reid