List file names based on a filename pattern and file content?

How can I use Grep command to search file name based on a wild card "LMN2011*" listing all files with this as beginning?

I want to add another check on those file content.

If file content has some thing like

LMN20113456

Can I use GREP for this?

Grep -ls "LMN2011*"   "LMN20113456"

What is the proper way to search the file names and its contents using shell commands?

38
задан jww 3 December 2018 в 12:19
поделиться