msgbartop
A chronological documentation test project, nothing serious, really!
msgbarbottom

31 Jan 2007 macfind

Posted by

I’ve made a simple bash script to find MAC adresses in DHCP config files.

#!/bin/bash

if [[ -z $1 || $1 == "--help" ]]
then
        echo "usage: $0 xx:xx:xx:xx:xx:xx "
fi

grep -i $1 /etc/dhcpdb/* -R

Usage example

macfind 00:18:8B:2C:DC:AA

Result

/etc/dhcpdb/53-nettet/subnet.conf:hardware ethernet 00:18:8b:2c:dc:aa;
/etc/dhcpdb/macadresser/it-avd.conf:    subclass        "it-avd" 1:00:18:8b:2c:dc:aa; # Hans-Henry

Tags: , ,

Comments are closed.