DHCP reserve script

cat listado | tr 'A-Z' 'a-z' | awk '{print "host "$3" {\n""hardware ethernet "$1";\n""fixed-address "$2";\n""}"}'

### listado

00:23:24:29:19:CF 192.168.52.75 Usuario_Call_1

Output:
host usuario_call_24 {
hardware ethernet 40:61:86:4c:cc:1e;
fixed-address 192.168.52.148;
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s