Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!husc6!think!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: <210@unicom.UUCP>
Date: Tue, 1-Dec-87 14:42:23 EST
Article-I.D.: unicom.210
Posted: Tue Dec  1 14:42:23 1987
Date-Received: Sat, 5-Dec-87 14:21:12 EST
References: <1254@saturn.ucsc.edu> <209@unicom.UUCP> <9548@mimsy.UUCP>
Reply-To: dv@unicom.UUCP (David W. Vezie)
Organization: None
Lines: 28
Summary: It is possible

In article <9548@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes:
>This *sometimes* does what is desired.  But there is no way to do
>in csh the following (without using temp files, which might overflow):
>
>	>Perrors; >ierrors; >perrors; >eerrors
>	while loop; do
>		P 2>>Perrors | i 2>>ierrors | p 2>>perrors | e 2>>eerrors
>	done | filter

You're talking about two different things here.  It is true that you
can't redirect the output of a loop.  However, the middle line there
is possible via:

( P | ( i | ( p | ( e > /dev/tty) >>&! eerrors) >>&! perrors) >>&! ierrors) \
								>>&! Perrors

Now, I will be the first to admit that this looks terrible
(do I hear some people screaming "HACK HACK HACK" :-),
but it IS possible.

Don't get me wrong here, I don't *like* csh, per se, it's just that
it's the only shell I have access to that supports job control and
history (I use the bourne shell for shell scripts, though, I mean I'm not
stupid!).
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
David W. Vezie, Systems Hacker         |  "I support Star Wars (tm),
{{sun,ucbvax}!pixar,well}!unicom!dv    |           it's SDI I can't stand" --ME