homepage Welcome to WebmasterWorld Guest from 54.226.180.223
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Having trouble with basic grep command
moheybee




msg:909276
 4:47 am on Mar 29, 2005 (gmt 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.

 

rharri




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

What does it show without the -c flag?

Bob

moheybee




msg:909278
 8:13 am on Mar 29, 2005 (gmt 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)

moheybee




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

Here was the fix:

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved