机器人移动
底盘详解⼏种Linux查询外⽹出⼝IP命令的⽅法Curl 纯⽂本格式输出:curl icanhazip
curl curlmyip
curl ip.appspot
curl ipinfo.io/ip
curl ipecho/plain
ackip/i
curl JSON格式输出:
curl ipinfo.io//all.ackip/ip?json
陶瓷运输curl XML格式输出:
/l
/all屋顶融雪装置
虹吸式咖啡壶
使⽤ DYDNS (当你使⽤ DYDNS 服务时有⽤)
rc延时电路图curl -s '' | sed 's/.*Current IP Address: \([0-9\.]*\).*/\1/g'
vb连接sql数据库curl -s / | grep -o "[[:digit:].]\+"
使⽤ Wget 代替 Curl
wget ipecho/plain -O - -q ; echo
wget observebox/ip -O - -q ; echo
使⽤ host 和 dig 命令
如果有的话,你也可以直接使⽤ host 和 dig 命令。
host -t a dartsclink | sed 's/.*has address //'
dig +short myip.opendns @resolver1.opendns
bash 脚本⽰例:
#!/bin/bash
PUBLIC_IP=`wget ipecho/plain -O - -q ; echo`
echo $PUBLIC_IP
以上就是本⽂的全部内容,希望对⼤家的学习有所帮助,也希望⼤家多多⽀持。