source /etc/profile
######################################################################################################
#
#List the system eth's Mac-address
######################################################################################################
echo "This MAC-Address is in file /etc/udev/rules.d/70-persistent-net.rules"
i=0
while [ $i -lt 5 ]
do
grep eth$i /etc/udev/rules.d/70-persistent-net.rules > /root/mac.txt
#########################################################################################################
#Modify the IP and MAC addresss #
#########################################################################################################
read -p "Please input which eth number you will modify(0-4):" input_ethnum
sed -i '3a\GATEWAY='$GATE'' /root/ifcfg.txt
sed -i '3a\PREFIX='$PRE'' /root/ifcfg.txt
sed -i '3a\IPADDR='$IP'' /root/ifcfg.txt
sed -i '1a\DEVICE='$ethnumber'' /root/ifcfg.txt
sed -i '1a\ONBOOT=yes' /root/ifcfg.txt