shell脚本使用curl批量解析号码归属地
本节内容:
一例使用curl批量解析号码归属地的shell脚本代码。
例子:
# File Name: area.sh
# Created Time: 2013年07月03日 星期三 19时57分00秒
# 号码归属地解析 www.jquerycn.cn
# 格式:号码前七位+**** 归属地:省 市
#----------------------
telno_file=roam_telno
cat ${telno_file} |while read telno
do
#只送号段过去
telno_hd=`echo $telno |cut -c 1-7`
show_telno=${telno_hd}****
re=`curl -s wap.ip138.com/sim_search.asp?mobile=$telno_hd|sed -n '15p'|sed 's#<br/>##g'`
echo "${show_telno} $re" >>$telno_file_y
done
您可能感兴趣的文章:
shell脚本使用curl批量解析号码归属地
使用curl获取网站的http的状态码
php curl参数详解与用法大全
php curl_init函数用法举例
PHP cURL 函数
expect脚本远程批量管理服务器的思路解析
php如何使用curl?(用法介绍)
php中curl实现GET和POST请求抓取网页或上传文件
shell脚本中使用curl下载更新号段表
什么是批处理