Linux Commands Examples

A great documentation place for Linux commands

gethostip

convert an IP address into various formats


see also : syslinux

Synopsis

gethostip [-dxnf] [HOSTNAME|IP]


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples

0
source
            
IP=`/usr/bin/gethostip ${1} | cut -f2 -d" "`
TRACEROUTE=`/usr/sbin/traceroute ${IP} 2>&1 | grep "(${IP}) "`
0
source
            
source_folders=(Henrik Karin Musik Pictures Videos)
backup_root="/home/backup/desktop"
desktop_ip=$(gethostip -d desktop)
mountpoint=$(mktemp -d)

description

This manual page documents briefly the gethostip command.

The gethostip utility converts the given hostname or IP address into a variety formats. It is provided by the syslinux package to make it easier to calculate the appropriate names for pxelinux configuration files. These filenames can be the complete hexadecimal representation for a given IP address, or a partial hexadecimal representation to match a range of IP addresses.

options

A summary of options is included below.

-d

Output the IP address in decimal format.

-x

Output the IP address in hexadecimal format.

-n

Output the host’s canonical name.

-f

Full output. Outputs the IP address in all supported formats. Same as -xdn.


see also

syslinux

More details can be found in the pxelinux documentation, which can be found in /usr/share/doc/syslinux/pxelinux.doc.gz on Debian GNU/Linux systems.


author

This manual page was compiled by dann frazier <dannf[:at:]debian[:dot:]org> for the Debian GNU/Linux system (but may be used by others).

How can this site be more helpful to YOU ?


give  feedback