2011年10月24日

jSoup Cookbook-提取数据 7 使用选择器语法查找元素

摘要: 问题采用CSS或类似jquery 选择器(selector)语法来处理HTML文档中的数据。方法利用方法:Element.select(String selector)和Elements.select(String selector)。File input = new File("/tmp/input.html");Document doc = Jsoup.parse(input, "UTF-8", "http://example.com/");Elements links = doc.select("a[href]&quo 阅读全文

posted @ 2011-10-24 22:24 linzuxin 阅读(156) 评论(0) 推荐(0) 编辑

Linux kill多个进程

摘要: 经常需要Kill多个进程,这些进程包含共同的关键字,可以用一条命令Kill掉它们。ps aux | grep "common" | cut –c 9-15 | xargs kill –9管道符“|”用来隔开两个命令,管道符左边命令的输出会作为管道符右边命令的输入。下面说说用管道符联接起来的几个命令:"ps aux" 查看所有进程的命令。这时检索出的进程将作为下一条命令grep "common"的输入。"grep "common" 选出所有含有关键字"common"的进程。"c 阅读全文

posted @ 2011-10-24 09:33 linzuxin 阅读(159) 评论(0) 推荐(0) 编辑

导航