$ man -t bash | ps2pdf - > bash.pdf $ man cmd|col -b>cmd.man //导出man手册 -b 去掉所有退格符 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/28814/showart_362245.html
本帖最后由 justqb 于 2012-09-03 10:43 编辑 有大概200g,50w个 pdf文件要处理。 主要是从里面提取一下需要的信息。 我的思路是把pdf转成TXT,然后用正则处理。 我的代码:[code]#!perl -w use strict; use 5.010; use CAM::pdf; open TST ,">tst.txt"; my ($dir, $subdir, @files, $file)= ("tst" , "" ); my ($pdf, $pagecount, $text1,); opendir DIR , $dir;#打开文件夹tst @files = grep {/pdf$/} readdir DIR;#读取文...