grep is always recursive

Loïc Grenié loic.grenie at gmail.com
Sat Jan 24 18:17:32 UTC 2009


2009/1/24 Hal Burgiss <hal at burgiss.net>:
> On Sat, Jan 24, 2009 at 06:46:33PM +0100, Loïc Grenié wrote:
>> > Some of the listings there are directories. But I don't see any reason
>> > for grep itself to act recursively. Interestingly, I find this only
>> > happens in $HOME. If I cd to somewhere else, grep acts as expected.
>> > Very strange.
>>
>>     Thus funny !
>>
>>     Could you try
>>
>> /bin/grep a *
>>
>>   then
>>
>> ln -s /bin/grep /tmp/toto
>> /tmp/toto a *
>>
>>   to see if they have the same behaviour ?
>
> Identical behavior (recursive).

    Do you have the possibility to try your recursive grep
  on the computer where grep is not recursive and the
  non-recursive grep on the computer where grep is
  recursive (cross test) ?

     It looks like some GREP_OPTIONS creep in...

          Loïc




More information about the ubuntu-users mailing list