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.
24Kテキストファイルに存在することを確認したい13K用語のリストがあります。最後に、terms->file namesコンテキストが必要です。
terms->file names
Unix / bashコマンドを使用してこれを達成するための最良の方法は何ですか?
私はこのようなPerlスクリプトを使用できますが、遅すぎます:
#!/usr/bin/perl #....skip... foreach my $term (@terms) { system("grep $term /corpus/*.txt/") }
grep --fixed-strings --word-regexp --with-filename --file=terms.txt --recursive /corpus