Welcome to WebmasterWorld Guest from 54.145.209.34

Forum Moderators: bakedjake

Having trouble with basic grep command

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

10+ Year Member



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)

10+ Year Member



What does it show without the -c flag?

Bob

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

10+ Year Member



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)

10+ Year Member



Here was the fix:

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

 

Featured Threads

Hot Threads This Week

Hot Threads This Month