#!/bin/sh
ping [你的花生壳二级域名] -c 1 > temp.txt
cat temp.txt |grep "PING" |awk '{print $3}' |sed 's/(//' |sed 's/)//'
[root@centos ~]# curl http://icanhazip.com/
183.15.104.78
[root@centos ~]# curl http://whatismyip.org
183.15.104.78
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |