hmilyld #! /bin/bash for ip in $@; do curl "http://ip-api.com/json/$ip?lang=zh-CN&fields=query,country,city,isp" echo -e "" done 另存为ip.sh,然后chmod u+x ip.sh,使用时ip.sh google.com即可。 如果想显示更全的信息,删除fields字段就行了,具体参数参考Api参数查询