Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
別のディレクトリとファイル名で単一の単語をgrepする方法も、別のディレクトリで同じです。
あなたが何を望んでいるのかよくわかりません。
走れませんか
grep -rwn word /some/dir1/ /other/dir2/
GNU grepのドキュメントを読んでください!
bash を使用している場合は、次を使用できます。
grep 'pattern' {dir1,dir2,dir3}/filename
各ファイルを引数として指定します。
grep -w vwhat /some/file /another/file /a/third/file