I\'m trying to make a Bash script to extract results from an HTML page. I achieved to get the content of the page with Curl, but the next step is parsing the output, which is pr
Just use awk:
awk -F '<[^>]+>' ' found { sub(/^[[:space:]]*/,";"); print title $0; found=0 } // { title=$2 } // { found=1 } ' file ITEM 1;ITEM DESCRIPTION 1 ITEM 2;ITEM DESCRIPTION 2 0 讨论(0) 查看其它2个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复