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.
2 つのテキスト ファイル [行を含む生ファイルとキーワードを含む辞書ファイル] があります。生ファイルの辞書ファイルの各単語を検索し、一致する場合は、生ファイルの一致する行の隣に辞書の単語を出力します。
grepオプションを使用して、ファイルからパターンを読み取るように指示でき-fます。-wオプションを使用して単語のみを検索することもできます。
grep
-f
-w
grep -wf dictionary.txt rawfile.txt