From owner-freebsd-questions@FreeBSD.ORG Tue Mar 29 14:29:27 2005 Return-Path: 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 5CBE416A4CE for ; Tue, 29 Mar 2005 14:29:27 +0000 (GMT) Received: from mail23.sea5.speakeasy.net (mail23.sea5.speakeasy.net [69.17.117.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 297D443D46 for ; Tue, 29 Mar 2005 14:29:27 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 13021 invoked from network); 29 Mar 2005 14:29:26 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail23.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 29 Mar 2005 14:29:26 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id 3B6FB2F; Tue, 29 Mar 2005 09:29:25 -0500 (EST) Sender: lowell@be-well.ilk.org To: Andrew References: From: Lowell Gilbert Date: 29 Mar 2005 09:29:25 -0500 In-Reply-To: Message-ID: <44ll86v83e.fsf@be-well.ilk.org> Lines: 29 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-questions@freebsd.org Subject: Re: Basic grep isn't working for me X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2005 14:29:27 -0000 Andrew writes: > This command has always worked before, but we recently moved to a new > server and now it isn't. > > --- > > su-2.05b# /usr/local/bin/keychain | grep -c existing > > KeyChain 2.5.1; http://www.gentoo.org/proj/en/keychain/ > Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL > > * Found existing ssh-agent (84261) > > 0 > > --- > > Any help would be much appreciated. It is printing its output on standard error, not standard output. In sh, you could do this by redirecting standard error onto standard output: $ keychain 2>&1 |grep exist * Found existing ssh-agent (46206) $ but you can't do that in csh-type shells.