grep -R won't recurse directories

From: j kopek (remove_leading_jgb_jgbjprok_at_optonline.net)
Date: 01/28/04


Date: Wed, 28 Jan 2004 14:06:53 GMT

there is probably a reason for this ( I hope )
when I try to perform a grep and specify "-R" or "-r", ommitting the
quotes, the search only searches the current directory.

So performing

grep -R somestring *.txt

or

grep -R somestring ./*.txt

will only return strings found in the current directory.

I believe I RTFM, but maybe I need to RRTFM!

Thank you I appreciate the help

john



Relevant Pages

  • Re: grep -R wont recurse directories
    ... > quotes, the search only searches the current directory. ... > So performing ... > will only return strings found in the current directory. ... In grep -R somestring ./*.txt the shell will expand to all the files ...
    (linux.redhat)
  • Re: grep with regex in tcsh
    ... grep pattern1.*pattern2 file ... Putting 'pattern1.*pattern2' in double quotes made it work correctly. ... grep pattern1 file | grep pattern2 ... Shell Scripting Recipes: ...
    (comp.unix.shell)
  • Re: repalce the some lines of file1 to file2
    ... The double quotes are within single quotes and taken literally. ... if grep "^$line:" passwd ... echo "$DESTLINE" ...
    (comp.lang.awk)
  • Re: grep & regexp
    ... >I've tried several grep variants but unsuccessully. ... or perhaps perl (the double quotes below around ... the perl -e argument expand $variable from your shell, ... perlish for double quotes that makes it easier to do things like this from ...
    (comp.unix.sco.misc)
  • Re: how to find word in all files on partition?
    ... info grep ... If you want to search for "something" including the double quotes, ... grep will then search through the files to find your string. ...
    (comp.os.linux)