LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Passwordless SSH access

[ILUG] Passwordless SSH access

Niall O Broin niall at linux.ie
Wed Mar 20 13:07:52 GMT 2002


On Wed, Mar 20, 2002 at 11:37:43AM +0000, John Tobin wrote:

> > What is it about grep and RE that causes this behaviour ? (note that the
> > above example is not always correct. For example, 
> 
> The command line as shown by ps will be "grep [f]oo", which doesn't
> match "foo".

Doh! 

> > niall at bagend:~ >ps -ax|grep [f]oo
> >  1944 pts/8    S      0:00 grep foo
> > 
> > but if you ensure that grep sees the RE like this
> >  
> > niall at bagend:~ >ps -ax|grep "[f]oo"
> > niall at bagend:~ >
> > 
> > it's fine)
> 
> Do you by any chance have a file called foo in that directory?  bash

Double doh! - I know bash expands [f] hence I quoted it for grep but making
the logical leap of looking for a local foo escaped me :-) - I do of course
have one.

> > Does grep manipulate its arguments as saved or what ? Because I called my
> > script ssh-agent-setup I matched on  "$USER.*ssh-agent$" and that works also
> > (i.e. ps|grep doesn't find the grep) but leaving out the $ doesn't work

Yes, clearly the same answer as above.



Thanks,



Niall




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell