How to grep single word in different directory and file name is also same in different directory.
I'm not sure to understand what you want.
Can't you just run
grep -rwn word /some/dir1/ /other/dir2/
Read the GNU grep documentation!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With