`

sed 过滤html标签

 
阅读更多

sed是一个很不错的流编辑器,在过滤html标签的用法如下:

 

1. 抓取一个简单网页,并保存

 

curl http://www.google.com -o 'google.html'

 

2.查看网页内容

 

cat google.html

 

3.执行过滤命令,进行html标签过滤

 

sed 's/<[^<]*>//g' google |cat google.txt

 

 


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics