I see two IP addresses coming after "host" in your file, so do you want to get each IP addresses that occurs after each "host" word? Can you illustrate the output you want?
Yes, exactly what I want. Sample output would look something like this:
The trick here is, some lines have one host, some have two, and others have none. I need all of the lines in the output file though, with just the IPs resolved.
I want to make a script to read a list of ip addresses from a file then convert those ip addresses to ip number.
ip number is made by removing the dots then transfer to a number , so the ip number transfered to binary then to decimal which will represents the ip number 0 : 4294967295
Also I... (17 Replies)
I have a problem that when I am pinging with the IP address it is giving me whether a server is alive or not but when I am trying it with hostname it is giving unknown host
I have checked in /etc/hosts file and the IP address and hostname are both there...still the problem is there..
Can... (1 Reply)
Dear Experts,
I have a text file on my itanium box which contains list of nearly 1000 hostnames. I do not have the IP Address of them. I want read each entry from the text file and want to do a nslookup to the DNS Server and get the IP Adresses and put them in another file in the format... (1 Reply)
Hi there
Im not quite sure how i can do this, but i am retrieving the mac address from boxes, which in some instances is arriving in its shortened format (i.e. dropping the leading zeros)... for example
0:3:BA:1:E:84
Im trying to figure out a way of converting the single character... (3 Replies)
edit; I found a solution that works, see thread #3 https://www.unix.com/302417065-post3.html
Hi there,
I have a small dedicated server that has four ip addresses and by default my httpd sends request using the servers main ip for all outbound connections.
I'm quite amateur at routing and... (4 Replies)
Hi All,
So we added a new HP-UX 11.31 machine. Copied OS via Ignite-UX (DVD)over from this machine called machine_a. It was supposed to be named machine_c. And it is when you log in...however when I'm in the ILO console before logging in, it says:
It should say:
What gives? And how do... (4 Replies)
We are using Solaris as our database OS. Can you please help me to know how can i get the IP address of a solaris machine in my network from its hostname?
e.g. We have a remote database server with the hostname as xyz. Without connecting to the database OS, can i get the IP address of xyz OS from... (1 Reply)
Hi all,
I am trying to exchange hostname and IP address of two AIX machines.
But i am confused as how to change it ?
do i need to use "smitty mktcpip" or "smitty tcpip" ?
what is the difference between smitty mktcpip and smitty tcpip ?
Also anymore steps to follow or just updating... (3 Replies)
Mutt 1.2.3.1i
AIX 5.3.12.1
We need to send email to external addresses. But are having problems with the sent-from hostname. They're going out with @server.mycompany.com. We need them to be @mycompany.com.
I'm setting from and hostname with -e 'set from="From... (1 Reply)
Hi,
Anyone can help?
Currently :
I'm am using a smtp smart relay, 1 hostname but different IP Address 192.168.2.108 and 192.168.2.109).
I'm using "smtp.mailhostname.com mailhost" and having an IP Address 192.168.2.108, but there is a certain minutes/seconds that the IP Address will... (2 Replies)
Discussion started by: fspalero
2 Replies
LEARN ABOUT DEBIAN
addr2name
ADDR2NAME(1) User's Manual ADDR2NAME(1)NAME
addr2name, name2addr - perform DNS lookups from scripts
SYNOPSIS
addr2name [-46cmnr] [HOSTNAMES]
name2addr [-46cn] [HOSTNAMES]
DESCRIPTON
Write addresses or canonical hostname of specified names to the standard output. If no names are specified via the command line, they are
read from the standard input.
OPTIONS -4 or --ipv4
Only try to perform IPv4 lookups.
-6 or --ipv6
Only try to perform IPv6 lookups.
-c or --config
Only lookup and print results for address families that match locally configured addresses (If the system has no IPv4 resp IPv6
address, then IPv4 resp IPv6 addresses are ignored).
-h or --help
Display some help and exit.
-m or --multiple
Normally, if a name yields multiple results, only the first one is printed. With this optional parameter, all results will be
printed on a single line, separated by spaces.
-n or --numeric
Prevent forward hostname lookup. This ensures that the input names are numeric addresses, which do not need to be looked up. Typi-
cally used along with the --reverse option to convert numerical addresses to canonical hostnames.
-r or --reverse
Perform a reverse DNS lookup (enabled implicitly with addr2name). addr2name prints numerical resolved addresses by default instead.
--version
Display program version and license and exit.
SEE ALSO host(1), getaddrinfo(3), getnameinfo(3), resolv.conf(5)AUTHOR
Remi Denis-Courmont <remi at remlab dot net>
$Id: addr2name.1 658 2010-10-31 20:56:30Z remi $
http://www.remlab.net/ndisc6/
addr2name $Date: 2010-10-31 22:56:30 +0200 (dim. 31 oct. 2010) $ ADDR2NAME(1)