擅长:python、mysql、java
<p>假设html代码存储在mycode.html文件中,下面是一种bash方法:</p>
<pre><code>paste -d: <(grep '<th>' mycode.html | sed -e 's,</*th>,,g') <(grep '<td>' mycode.html | sed -e 's,</*td>,,g')
</code></pre>
<p>注意:输出没有完全对齐</p>