- UCVPS2011-12-19论坛元老17305
比如你需要提取index.html里面所有的.rar的下载链接
命令如下SED:
sed 's/http:/\n&/g' index.html | sed 's/\.rar/&\n/g' | sed -n 's/^http:\(.*\)\.rar$/&/p'
PERL:
perl -ne 'while (/(http[\S]*\.rar)/g) {print "$1\n";}' index.html
其中的index.html换成.可以对当前文件夹下所有的文件操作迅雷批量下载+这个脚本可以批量提取某些东西