ifdata is a program to display network device information in a clean, simple format.

Display IPv4 address, fex,

ifdata -pa eth0

Print yes or no if the interface exists.

ifdata -pe eth0

Return an exit code if device exists or not:

ifdata -e eth0

Print netmask:

ifdata -pn eth0

Print the broadcast address:

ifdata -pb eth0