Archive for the ‘one-liner’ Category

Remove comments from configuration files

Posted: 23rd April 2010 by Valkyrka in bash, one-liner, sed, shell

Here is how you can remove comments ( the ones starting with # ) from configuration files : This will remove all comments from Apache's configuration file.

Get gateway IP

Posted: 23rd April 2010 by Valkyrka in bash, one-liner

If you need to get the IP of the gatway, simply use the following command :

Get MAC address of network devices

Posted: 23rd April 2010 by Valkyrka in bash, one-liner

This command will provide the MAC address of your network cards on your box : Here is a sample output :