如何在Linux Shell脚本中搜索pdf文件的内容? [英] How can I search the content of a pdf file in linux shell script?
本文介绍了如何在Linux Shell脚本中搜索pdf文件的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我以pdf格式提供了一些期刊论文.我想找出论文的标题和作者列表.我该如何在Shell脚本中做到这一点?
Suppose I have given some journal paper in pdf format. I want to find out the title and Author List of the papers. How can I do that in shell scripts ?
推荐答案
我不知道这是否适用于您的日记,它适用于某些pdf文件:
I do not know if this works for your journal, it works on some pdf files:
strings "myjournal.pdf" | egrep "/Author|/Title" | tr '/' '\n' | egrep "Author|Title"
这篇关于如何在Linux Shell脚本中搜索pdf文件的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文