Page 14 of 23
dns_addr_to_name
Resolves an IP address through the DNS
If the address cannot be resolved, displays nothing
Arguments
$1 | IP address |
$2 | Optional. DNS server to ask |
Returns
Always 0Displays
Host name as returned by the DNS or nothing if address could not be resolved.dns_name_to_addr
Resolves a host name through the DNS
If the name cannot be resolved, displays nothing
Arguments
$1 | Host name to resolve |
$2 | Optional. DNS server to ask |
Returns
Always 0Displays
IP address as returned by the DNS or nothing if name could not be resolved.domain_part
Suppresses the host name part from a FQDN
Displays the input string without the beginning up to and including the first '.'.
Arguments
$1 | Input FQDN |
Returns
Always 0Displays
truncated stringhost_part
Extracts a hostname from an FQDN
Removes everything from the first dot up to the end of the string
Arguments
$1 | Input FQDN |
Returns
Always 0Displays
truncated stringprimary_ip_address
Get the primary address of the system
This is an arbitrary choice, such as the address assigned to the first network nterface. Feel free to improve !
Arguments
None