Centos automatic ifcfg-eth0 scripts based on list of IPs from bash
<p>It's a basic script that reads the file "ips.txt" in the current directory and then creates a corresponding ifcfg file</p>
<p> </p>
<p> </p>
<p><code>#!/bin/bash<br />
GATEWAY=192.168.1.1</code></p>
<p><code>NETMASK=255.255.255.0</code></p>
<p>device=eth0</p>
<p><code><br />
counter=0<br />
for ips in `cat ips.txt`; do<br />
ethconfig=$(cat <<</code>SETVAR</p>
<p> </p> Tags: