I agree. As you didn't post in a specific section, it's hard to tell you..
here is one for debian
The network configuration files are (unfortunatly) different from distribution to distribution (dhcp/wpa) You could build a short script to do it manually but why reinventing the wheel? Usually you are supposed to use
ifup <interface> to bring up an interface.