Assuming you have curl and awk available, just run to get a list of the IPV4 root name server ips

curl http://www.internic.net/zones/named.cache | awk '{ if ($3 == "A") { print $NF } }'

or

curl http://www.internic.net/zones/named.cache | awk '{ if ($3 == "AAAA") { print $NF } }'

for a list of the IPV6 root name server ips