user1700214
user1700214

Reputation: 1445

how to find specific text in files using grep in shell

I want to search for some string is all subfolders directly in files

I need to find out string:

DEBUG ('[S:B:H] project=', $project->name, '<<<<<<<<<<<<<');

I used to use grep -lir 'some text' *

but I suppose it isn't working like that.

Upvotes: 2

Views: 297

Answers (1)

Ajith Sasidharan
Ajith Sasidharan

Reputation: 1155

this one works ::

grep -lier 'DEBUG ('\''\[S:B:H] project='\'', $project->name, '\''<<<<<<<<<<<<<'\'');' <testfile>

Upvotes: 1

Related Questions