#!/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\.]+   ----这样做的意义是为了匹配二级域名及多级