Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!husc6!hao!ames!ucbcad!ucbvax!ucsfcgl!pixar!unicom!dv
From: dv@unicom.UUCP (David W. Vezie)
Newsgroups: comp.unix.questions
Subject: Re: Redirecting stderr in csh
Message-ID: <209@unicom.UUCP>
Date: Wed, 25-Nov-87 17:48:47 EST
Article-I.D.: unicom.209
Posted: Wed Nov 25 17:48:47 1987
Date-Received: Sun, 29-Nov-87 15:47:33 EST
References: <1254@saturn.ucsc.edu>
Reply-To: dv@unicom.UUCP (David W. Vezie)
Organization: None
Lines: 18
Summary: (cmd > /dev/tty) >& file

In article <1254@saturn.ucsc.edu> koreth@ssyx.ucsc.edu (Steven Grimm) writes:
>How do you redirect stderr without redirecting stdout in csh?  In sh, you
>can use "2> filename", but there doesn't seem to be a csh equivalent.

You can use the "subshell" feature of csh, and do:
(cmd > /dev/tty) >& filename

That will send the standard output to /dev/tty (your terminal), and
the diagnostic output to filename.  Of course, if you want the standard
output to go somewhere else, that's easily done with:

(cmd > stdout_filename) >& stderr_filename

Pipes are also possible, for both the standard output and the diagnostic
output.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
(no real .signature yet)  		David W. Vezie
					{ucbvax|sun}!pixar!unicom!dv