码迷,mamicode.com
首页 > Web开发 > 详细

匹配url_shell脚本

时间:2016-08-10 22:58:34      阅读:635      评论:0      收藏:0      [点我收藏+]

标签:shell

#!/bin/bash
#匹配http://样式url
read -p "input the file path:" file
egrep -o "\<http://[a-z0-9\.]+\.[a-z]{2,3}\>" $file |sort|uniq -c|sort -rn >url


注释:[a-z0-9\.]+   ----这样做的意义是为了匹配二级域名及多级

          

本文出自 “天晴了要下雨” 博客,请务必保留此出处http://8776055.blog.51cto.com/8766055/1836659

匹配url_shell脚本

标签:shell

原文地址:http://8776055.blog.51cto.com/8766055/1836659

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!