Welcome to WebmasterWorld Guest from 54.224.230.193

Forum Moderators: bakedjake

Message Too Old, No Replies

Having trouble with basic grep command

     
4:47 am on Mar 29, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 20, 2004
posts:98
votes: 0


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; [gentoo.org...]
Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL

* Found existing ssh-agent (84261)

0

---

Previously the command would return: 1 because it was finding one instance of "existing" in the keychain output.

Now it appears to completely ignore the output of keychain.

Any help would be much appreciated.

5:45 am on Mar 29, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 20, 2002
posts:123
votes: 0


What does it show without the -c flag?

Bob

8:13 am on Mar 29, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 20, 2004
posts:98
votes: 0


Nothing. It doesn't recognize the keychain output for some reason.

su-2.05b# /usr/local/bin/keychain grep existing

KeyChain 2.5.1; [gentoo.org...]
Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL

* Found existing ssh-agent (84261)

10:19 pm on Mar 29, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 20, 2004
posts:98
votes: 0


Here was the fix:

su-2.05b# /usr/local/bin/keychain 2>&1 ¦ grep -c existing
1