file1.txt
2つのファイル(&)があるとしましょうfile2.txt
。
file1.txt
:(1行に1つずつ単語リストのみを含む)
Car
Ricky
file2.txt
:(次の単語を使用する行(構文)を含みますfile1.txt
。)
he has a Car
there is no food
I have a book
road is straight
Ricky is a good student
出力は次のようになります。
he has a Car
Ricky is a good student
ベストアンサー1
grep
このオプションをサポートする場合-w
:
grep -wFf file1.txt file2.txt