#!/bin/bash # Create a tmp directory in your current working directory so you # can review the files after they are created. # Change the alias number to the number of the last numbered alias. # The first alias will be :1 if set to 0, :2 if set to 1, etc. ALIAS=0 # Change to the location of the ip list file for IP in `cat tmp/siteengine3.txt` do ALIAS=$(( $ALIAS + 1 )); # Change the device to match the system if it's not using eth0 # There are 2 references to eth0 below, both should be updated. echo "DEVICE=eth0:$ALIAS IPADDR=$IP NETMASK=255.255.255.255" > tmp/ifcfg-eth0:$ALIAS done