【发布时间】:2015-03-19 08:02:25
【问题描述】:
我是 shell 脚本的新手,所以我需要一些帮助。通过 shell 脚本,我需要从类过滤的 html 中获取 href 属性的值。
例如:
<a class="other class" href="value I don't need"></a>
<a class="some class" href="url I need"></a>
在这种情况下,我需要获得类“某个类”的 a 标记的 href 值。 我需要将值放入变量中,需要使用 sed o grep,我对正则表达式一点也不擅长,所以我需要你的帮助。
【问题讨论】: