Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Dec 2007 00:09:03 -0500
From:      Chuck Robey <chuckr@chuckr.org>
To:        Chuck Robey <chuckr@chuckr.org>, freebsd-questions@freebsd.org
Subject:   Re: Apparently, csh programming is considered harmful.
Message-ID:  <4766046F.80904@chuckr.org>
In-Reply-To: <20071217015723.GE5874@piglet.digitaltorque.ca>
References:  <20071214010542.GA19553@demeter.hydra> <20071214022529.GA2571@kobe.laptop> <4761F17F.9030908@chuckr.org> <20071214033333.GA3455@kobe.laptop> <20071216232830.GD5874@piglet.digitaltorque.ca> <4765C4A5.4020906@chuckr.org> <20071217015723.GE5874@piglet.digitaltorque.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
Michael P. Soulier wrote:
> On 16/12/07 Chuck Robey said:
> 
>> There;s one item that is much more easily done in csh/tcsh than in the 
>> sh based ones .... that's redirecting the stderr along with the stdout. 
>>  with tcsh, when I do a make, I commonly do a:
>>
>> make |& tee makeout
>>
>> which causes both the stdout and stderr files to be redirected to the 
>> "makeout" make listing file.  I;'ve never figured out any reasonably 
>> simple way to do that in any sh-like shell.  Is there any simble way 
>> that you know of?
> 
> Yup. 
> 
> make 2>&1 | tee makeout
> 
> Now show me a simple way to redirect them to different files in csh.
> 
> foo 1>stdout.log 2>stderr.log
> 
> Mike

Believe it or not, I was actually trying to get information, not trying 
to make a point illustrating things.  I wasn't aware that you could mix 
the redirection modes .... but I just tested this, it does actually 
work, in both bash and sh.  Keen, I'll stow that guy away, because I've 
been asking that on occaison for years now..

Your question sounded to me like a back-handed way to illustrate 
something, but I'm  not all that deep.  I've never run into the need to 
do that redirect in tcsh, so I don't know how to do it.  I'm maybe justr 
a bit curious where you needed it, but I haven't an answer.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4766046F.80904>