我想直接将输出发送到 postgres 数据库!有可能我必须先将其转换为另一种格式!任何想法!!
curl -sG https://peeringdb.com/api/netixlan --data-urlencode asn=58717 \
--data-urlencode fields=ix_id,ipaddr4,ipaddr6,speed | jq -c '.data[]'
输出是:
{"ix_id":215,"speed":1000,"ipaddr4":"198.32.167.102","ipaddr6":null} {"ix_id":158,"speed":10000,"ipaddr4":"27.111.228.8 ","ipaddr6":"2001:de8:4::5:8717:1"} {"ix_id":158,"speed":10000,"ipaddr4":"27.111.229.92","ipaddr6":"2001 :de8:4::5:8717:2"} {"ix_id":429,"speed":10000,"ipaddr4":"103.16.102.35","ipaddr6":"2001:de8:12:100:: 35"}