In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
The shell script implements to find out which domain names still have resolution records from a pile of domain names in
Record generation requirements: find out which domain names still have resolution records from the pile of domain names provided by the IDC computer room
Sort first to remove duplicate domain names:
Cat 2.txt | sort-rn | uniq-c | awk'{print $2}'> test
Execute script sh 2.sh m or sh 2.sh e or sh 2.sh unknown corresponding generation file m.log e.log wujilu.log
[root@intf-06 ~] # cat 2.sh #! / bin/shlist=$ (cat / root/test) for n in $listdo echo $n | tee-a 1.log & ping-C1-I 0.1$ n-Q 2 > & 1 | tee-a 1.logdone if [$1 = = "m"]; thensed-e'/ Done/ {d}'- e'/\ [1\] / {d} '1.log | grep-B 1' PING' | grep "^ $1" > m.logecho "> 1.log elif [$1 =" e "] Thensed-e'/ Done/ {d}'- e'/\ [1\] / {d} '1.log | grep-B1' PING' | grep "^ $1" > e.logecho "> 1.log elif [$1 =" unknown "]; thensed-e'/ Done/ {d}'- e'/\ [1\] / {d} '1.log | grep" $1 "| awk-F' [:] +'{print $2}'> wujilu.logecho" > 1.logfi
The obtained results are as follows:
Secondary domain name [root@intf-06 ~] # cat m.log m.qxwfc.cnm.qldua.cnm.wstzk.cnm.gsnon.cnm.fzhxzm.cnm.ew740.cn with resolution record beginning with m [root@intf-06 ~] # cat e.log e.gsnon.cne.fzhxzm.cne.ew740.cn with resolution record [root@intf-06 ~] # cat wujilu.log m.0v43q.cne.x51se.cn without resolution record
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.