
BAT批量Nslookup后如何格式化輸出我在list.txt中羅列了需要nslookup的地址表:www.google.comwww.baidu.comwww.youku.comwww.bathome.net正如我們所知得到返回結果并不規律:(有的地址會有多個返回值,有的只有一個,況且行數也不規律)C:documents and Settingsadmin>nslookup www.google.comServer:68.192.128.61.cq.cq.cta.net.cnAddress:61.128.192.68Non-authoritative answer:Name:www.google.comAddresses:74.125.128.103, 74.125.128.99, 74.125.128.105, 74.125.128.10474.125.128.147, 74.125.128.106C:documents and Settingsadmin>nslookup www.baidu.comServer:68.192.128.61.cq.cq.cta.net.cnAddress:61.128.192.68Non-authoritative answer:Name:www.a.shifen.comAddresses:115.239.210.27, 115.239.210.26Aliases:www.baidu.comC:documents and Settingsadmin>nslookup www.youku.comServer:68.192.128.61.cq.cq.cta.net.cnAddress:61.128.192.68Non-authoritative answer:Name:fs-w.youku.comAddress:121.9.204.234Aliases:www.youku.comC:documents and Settingsadmin>nslookup www.bathome.netServer:68.192.128.61.cq.cq.cta.net.cnAddress:61.128.192.68Non-authoritative answer:Name:www.bathome.netAddress:117.25.131.86我想做到的是通過批量nslookup按照如下顯示(左邊顯示IP地址,右邊顯示網址)輸出到Answer.txt文件中:74.125.128.103#www.google.com74.125.128.99#www.googel.com74.125.128.105#www.googel.com74.125.128.104#www.googel.com74.125.128.147#www.googel.com74.125.128.106#www.googel.com115.239.210.27#www.baidu.com。。。。。。。。更深一步想:若是能再調用Ping篩選出每個網址中最快的IP保存更好了,不過我知道羅馬并不是一天練成的,呵呵

