Avatar of rgb192
rgb192
Flag 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
LinuxSSH / Telnet Software

Avatar of undefined
Last Comment
rgb192

8/22/2022 - Mon
ozo

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.
ozo

also, using 1, where I suspect you may have wanted l could also break things
rgb192

ASKER
so what command should I use to find this string
Your help has saved me hundreds of hours of internet surfing.
fblack61
ASKER CERTIFIED SOLUTION
Tintin

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ozo

Perhaps you meant
grep -lR mysql_connect .
rgb192

ASKER
so the problem was not the
_
it was
space before .
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'
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.