I need the GREP syntax for the following task (am in a LINUX OS):
querying ALL files in the CURRENT directory which contain STRING but only listing the FILENAMES which contain a match.
This question came from our site for professional and enthusiast programmers.
You can use
For more info on
In that case
Obviously, as a bash command, if your string contains special chars or spaces, you have to (in order) escape them and/or surrounding your string with quotas
"Grep -l" wil give you the list of file names.