全部博文(198)
分类: 系统运维
2015-12-02 16:24:52
#!/bin/sh
ifconfig -a | awk 'BEGIN{RS="\n\n";OFS=":\t"}/HWaddr/{sub(/addr:/,"");print $1,$7"\n"$1,$
ifconfig eth1 up
ifconfig -a | grep eth1
if [ $? == 0 ]
then
echo success
else
echo error
fi