eth0のIPアドレス設定 change.eth0.ipaddr [IPアドレス] #!/bin/bash ipaddr=$1 [ -z "$ipaddr" ] && read -p "new eth0 ipaddr: " ipaddr sed -i "s/IPADDR=.*/IPADDR=$ipaddr/" /etc/sysconfig/network-scripts/ifcfg-eth0 cat /etc/sysconfig/network-scripts/ifcfg-eth0 ホスト名変更 change.hostname [ホスト名] #!/bin/bash hostname=$1 [ -z "$hostname" ] && read -p "new hostname: " hostname sed -i "s/HOSTNAME=.*/HOSTNAME=$hostname/" /et