From owner-freebsd-questions Tue Feb 25 9:25:58 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C102837B401 for ; Tue, 25 Feb 2003 09:25:56 -0800 (PST) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E8AA43F3F for ; Tue, 25 Feb 2003 09:25:53 -0800 (PST) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a069.otenet.gr [212.205.215.69]) by mailsrv.otenet.gr (8.12.6/8.12.6) with ESMTP id h1PHPkOs014550; Tue, 25 Feb 2003 19:25:48 +0200 (EET) Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.7/8.12.7) with ESMTP id h1PHPjsG000837; Tue, 25 Feb 2003 19:25:45 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.7/8.12.7/Submit) id h1PHPh2b000836; Tue, 25 Feb 2003 19:25:43 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 25 Feb 2003 19:25:43 +0200 From: Giorgos Keramidas To: Brian Henning Cc: freebsd-questions@FreeBSD.ORG Subject: Re: tcsh redirect Message-ID: <20030225172543.GA669@gothmog.gr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2003-02-25 10:53, Brian Henning wrote: > hello- > can anyone tell me how to redirect just the stderr in tcsh? > > command > /dev/null #suppress stdout > command >& /dev/null #suppress stderr and stdout > > what can i run to suppress just the stderr? The easiest way I can think is to use sh(1) to redirect descriptors, which has a much cleaner and easy to use syntax for redirection. tcsh> cat lala #!/bin/sh echo "This shows up on stdout" echo "This shows up on stderr" >&2 tcsh> /bin/sh -c './lala 2>/dev/null' This shows up on stdout tcsh> - Giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message