how to find the IP address of a printer

I'm trying to find the IP address of a print queue. I tried this, but nada.

cat /etc/hosts | lp -d lp01

Looked in the hosts file but it's not there

If lp01 is the name of a printer, try lpstat -s. You may get a hostname or an ip address. You probably use DNS, so use nslookup to translate hostnames to IP addresses.

Perderabo:

Thanks. lpstat -s worked. Got lucky, the ip address was there.