A while back while at work I was tasked with getting all the MAC addresses of a new lab that had been installed. Well this gave me the option of going to each computer and finding the MAC and then writing it down, and doing this on all 24 machines.
Rather than doing this I took about 10 minutes and wrote a simple ruby script that would do this for me. After creating the script I added it to my `.bashrc` file so that it would run whenever I logged into a machine and then added that machines MAC to a list along with its hostname. With this all I had to do was go to each machine and login and out, and I was done in about 10 to 20 minutes and had a nice file that was ready to be used.
Below is the code for that simple little script:
Error when loading gists from http://gist.github.com/.