Skip site navigation (1)Skip section navigation (2)
Date:      29 Mar 2005 09:29:25 -0500
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        Andrew <mohebbi@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Basic grep isn't working for me
Message-ID:  <44ll86v83e.fsf@be-well.ilk.org>
In-Reply-To: <cf643b1b0503281754266bba2b@mail.gmail.com>
References:  <cf643b1b0503281754266bba2b@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Andrew <mohebbi@gmail.com> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44ll86v83e.fsf>