Basic grep isn't working for me
Lowell Gilbert
freebsd-questions-local at be-well.ilk.org
Tue Mar 29 06:29:27 PST 2005
Andrew <mohebbi at 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.
More information about the freebsd-questions
mailing list