Link to home
Start Free TrialLog in
Avatar of rgb192
rgb192Flag for United States of America

asked on

I think the underscore is breaking the search

search all files in all folders RECURSIVELY which have the keyword 'mysql_connect'


i tried
grep -1R "mysql_connect".


and get no result


note this question is different than my other question because I think the
_
underscore
is breaking the search
Avatar of ozo
ozo
Flag of United States of America image

There's no reason the _ should break the search,
but the lack of a space between the search string (mysql_connect) and the directory name (.) will break the search.
also, using 1, where I suspect you may have wanted l could also break things
Avatar of rgb192

ASKER

so what command should I use to find this string
ASKER CERTIFIED SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perhaps you meant
grep -lR mysql_connect .
Avatar of rgb192

ASKER

so the problem was not the
_
it was
space before .
Avatar of rgb192

ASKER

>>
There's no reason the _ should break the search,
but the lack of a space between the search string (mysql_connect) and the directory name (.) will break the search.

sorry
I didnt not understand the first answer until I clicked on 'correct answer'

I initially was confused by 'directory name'