in reply to grep ip address from dhcpd.leases file

varalaxmibbnl:

ww already pointed you to the grep function, but as to the database functionality, I'd suggest AnyDBM_File if you just need to lookup records based on their IP, or DBI (along with a suitable DBD backend suitable for the database you may be using) if you need more advanced lookup/update/etc. capabilities.

...roboticus

When your only tool is a hammer, all problems look like your thumb.