Path: utzoo!utgpu!water!watmath!clyde!ima!necntc!encore!sue From: sue@encore.UUCP (Sue LoVerso) Newsgroups: comp.unix.questions Subject: Re: Redirecting stdout stderr separately. Keywords: stdout, stderr, C-Shell, Bourne Shell. Message-ID: <2855@encore.UUCP> Date: 31 Mar 88 15:47:28 GMT References: <287@unh.UUCP> Reply-To: sue@encore.UUCP (Sue LoVerso) Distribution: na Organization: Encore Computer Corp, Marlboro, MA Lines: 19 In article <287@unh.UUCP> abc@unh.UUCP (Avinash B Chopde) writes: > >Is there any simple way in C-Shell to duplicate the following >Bourne Shell command to redirect stdout messages to file1 and >stderr messages to file 2 ? > >$ command 1> file1 2> file2 > The simplest way I know of is: % (command > file1) >& file2 Execute the command in a subshell, redirecting its output to file1, and then its stderr output can be redirected at shell level to file2. -- Susan J. LoVerso Encore Computer Corp. sue@multimax.arpa encore!sue