Searching dhcp.leases for an IP (by MAC)

Chris Carey chris.carey at gmail.com
Tue Dec 12 09:29:39 MST 2006


Actually... that is perfect. After that grep I can just snag the IP
from the top line. Thanks a bunch!


On 12/12/06, Matthew Walker <rorith at kydance.net> wrote:
> Not sure if this will help you, but grep -B # will add # lines of context
> before every match.
>
> grep -B 5 "MAC" dhcpd.leases
>
> should give you something you can use.



More information about the PLUG mailing list