Re: SUSE 10.1 - any issues with grep recursion?



bobmct wrote:
houghi wrote:

bobmct wrote:
'morning;

Is anyone aware of any issues with grep? Over the past few weeks I've
been having difficulties with recursion so I've had to navigate
directories
manually. But this is getting annoying.

This morning I've been working on my apache2 config and trying to do a
simple grep search like this:

/etc/apache2> grep -r SSLEngine *.conf

And I've tried the switch variants of:

-R, --recursive, -d recurse

All with no better results.
A search of google doesn't show any issues. My aliases are not doing
anything with grep.

Any ideas?

Yes, there is no file that contains that string and ends with *.conf
[19:14:07] [/etc/apache2]
root@penne : grep -r SSLEngine *.conf
[19:14:25] [/etc/apache2]
root@penne : grep -r SSLEngine *
vhosts.d/vhost-ssl.template: SSLEngine on
[19:14:27] [/etc/apache2]
root@penne : grep -r LoadModule *.conf
sysconfig.d/loadmodule.conf:LoadModule access_module \
/usr/lib/apache2-prefork/mod_access.so
<snip>

Well, I thing either you are not understanding my question or I am not
understanding your responses...

Or the expectancy of what I want is different.

The *.conf was the file(s) to look in for the SSLEngine string.

I understand that. I hope you understand that it can do only so if what
you are looking is written in that file.

To verify what I am experiencing I've tried recursing with ls. Here are
some examples from my home machine running 10.1:

/etc/apache2> ls -1 -R *.conf

OK. You seem to to understand what the command does.

<snip>
ssl-global.conf
uid.conf

Even though I explicitly stated -R (Recurse) on the command line you can
notice that there was no recursion.

You tell ls to look for *.conf and if it finds a directory also named
*.conf, to look recursively.

Now, here the results of the find command:

/etc/apache2> find . -name "*.conf" -print
./mod_mime-defaults.conf
./errors.conf
./extra/httpd-languages.conf

OK. You told ls to look in *.conf. 'extra' is not conform '*.conf', so
it skips that.

./uid.conf

This is conform "*.conf" so it is shown.

You can clearly see that recursion DID occur. So, what happening to my
recursion capability on my boxen???

It skipped those things that you told it to. It looks at what is in the
directory you tell it to.
To better see what happens is to do the following:
copy the directory 'extra' to extra.conf' Now you will have a directory
extra and an directory extra.conf

Try again. Hope that clears things up.

PEBKAC. ;-)
--
houghi
They say pesticides have been linked to low sperm counts.
In my opinion if you have bugs down there that are so bad
you need to use a pesticide, you're not gonna get laid anyway.
.