Surprisingly i could not find an answer without sub directories. ie I guess without the -R
option. What I was looking for was to search for text in a directory but avoid searching in subdirectories.
Original post
Tried
grep -nl 'text' /search/path/
But I get the error:
'search/path/ Is a directory`
Whereas if I try with:
grep -rnl 'text' /search/path/` --exclude-dir *
It still searched through subdirectories.