【发布时间】:2015-07-01 20:59:17
【问题描述】:
我想制作一个用于在 pdf 文件中搜索模式的 shell 脚本(让它们成为我自己的语料库!!)
我从这里偷了下面的sn-p
How to search contents of multiple pdf files?
find /path/to/folder -name '*.pdf' | xargs -P 6 -I % pdftotext % - | grep -C1 --color "pattern"
输出看起来像这样
--
--
small deviation of γ from the average value 0.33 triggers
a qualitative difference in the evolution pattern, even if the
我可以用这个命令打印文件名吗?
它不必是“单线”。
谢谢。
【问题讨论】:
-
管道不行,你必须写一些循环。