本机IP
LOCALHOST=`ifconfig|grep eth1 -A1|sed -n '2p'|awk -F":" '{print $2}' |awk -F" " '{print $1}'`
cat ifcfg-eth0|grep IP|awk -F\' '{printf $2 "\n"}'
0
本机IP
LOCALHOST=`ifconfig|grep eth1 -A1|sed -n '2p'|awk -F":" '{print $2}' |awk -F" " '{print $1}'`
cat ifcfg-eth0|grep IP|awk -F\' '{printf $2 "\n"}'