ファイルセットから用語を検索する

ファイルセットから用語を検索する

2つのファイルがあります。

files_to_search.out
terms_to_search.out

terms_to_search.outすべてのファイルで使用されていない用語を識別するコマンドを作成したいと思います。files_to_search.out

見つけることができるショートカットがありますか?

ベストアンサー1

高速で醜い1行の試み(GNU grep optionsを使用-o):

grep -of terms_to_search_out $(cat files_to_search.out | tr '\n' ' ') | sort | uniq | grep  -vf terms_to_search_out 

おすすめ記事