Script to get IP addresses of LAN computers

I need a shell script for OS X, one that can find IP addresses of machines connected to my LAN, get the names of the computer associated with those addresses, then display them like so in a list: "Bob's L33T Boxx: #.#.#.#" Something like the network scanner in Apple Remote Desktop is what I'm looking to recreate. Is there a way to do this? Thanks a lot!

You could search every IP in your domain... then perform an nslookup on them. If that is available in os x...