IP:ifconfig eth0|grep inet|awk '{print $2}'|awk -F: '{print $2}'
mac賦給變量
this_mac=`ifconfig eth0|grep eth0|awk '{print $5}'`
echo $this_mac
IP:ifconfig eth0|grep inet|awk '{print $2}'|awk -F: '{print $2}'
mac賦給變量
this_mac=`ifconfig eth0|grep eth0|awk '{print $5}'`
echo $this_mac
[root@host-172-16-13-33 ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sr0 11:0 1 1024M