From owner-freebsd-questions@FreeBSD.ORG Mon Dec 17 05:11:26 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFFAC16A417 for ; Mon, 17 Dec 2007 05:11:26 +0000 (UTC) (envelope-from chuckr@chuckr.org) Received: from mail3.sea5.speakeasy.net (mail3.sea5.speakeasy.net [69.17.117.5]) by mx1.freebsd.org (Postfix) with ESMTP id A193C13C45A for ; Mon, 17 Dec 2007 05:11:26 +0000 (UTC) (envelope-from chuckr@chuckr.org) Received: (qmail 24713 invoked from network); 17 Dec 2007 05:11:26 -0000 Received: from april.chuckr.org (chuckr@[66.92.151.30]) (envelope-sender ) by mail3.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 17 Dec 2007 05:11:26 -0000 Message-ID: <4766046F.80904@chuckr.org> Date: Mon, 17 Dec 2007 00:09:03 -0500 From: Chuck Robey User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.9) Gecko/20071107 SeaMonkey/1.1.6 MIME-Version: 1.0 To: Chuck Robey , freebsd-questions@freebsd.org 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> In-Reply-To: <20071217015723.GE5874@piglet.digitaltorque.ca> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: Apparently, csh programming is considered harmful. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2007 05:11:26 -0000 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.