##/bin/bashIP=($(grep-E-v"127.0.0.1|::"/etc/hosts|awk‘{print$1}‘))NAME=($(grep-E-v"127.0.0.1|::"/etc/hosts|awk‘{print$2}‘))Num=`grep-E-v"127.0.0.1|::"/etc/hosts|wc-l`foriin$(seq$Num)doecho"${IP[i-1]}-${NAME[i-1]}"done
分类:
编程语言 时间:
2016-05-07 01:19:53
阅读次数:
691