Skip to content

Posts from the ‘Awk’ Category

30
Oct

Awk script for changing Ubuntu network interfaces – added DNS feature

At last, I have added the DNS feature for the network interfaces awk script. This feature is only used with static network settings.

Assume we have the following settings in the interfaces file:
Read more »

1
Nov

Awk scripts for reading and editing Ubuntu /etc/network/interfaces file (Part 2/2)

ubuntulogoFor modifying the /etc/network/interfaces file, I use another script and it is slightly more complicated.

[ Modified 28/Nov/14 ] – Created a new github repository for this script

[ Modified 22/May/14 ] – Added feature to remove an interface definition

Read more »

1
Nov

Awk scripts for reading and editing Ubuntu /etc/network/interfaces file (Part 1/2)

ubuntulogoIt is pretty straightforward to setup permanent network configuration on Ubuntu 8.04. All you need is to edit /etc/network/interfaces file and a very thorough tutorial is given in http://www.cyberciti.biz/faq/setting-up-an-network-interfaces-file/ to show you how manually edit for DHCP, static and promiscuous mode. However, I cannot find any command line utility for configuring permanent network setup.

So here are couple awk scripts for reading and writing /etc/network/interfaces file. I hope someone will find it useful, especially for integrating with other programs.

[ Modified 28/Nov/14 ] – Created a new github repository for this script Read more »