3
votes
2answers
361 views

Converting Webserver Logged IP Addresses to DNS

I'm trying to use a bash script to process a webserver log file and replace any IP's it finds with their corresponding DNS hostnames. An example entry of a single line from the log file is: ...
2
votes
1answer
235 views

Method to perform DNS lookup step very quickly during wget

When I download any document from internet using wget. It shows maximum amount of time consumed in getaddrinfo(). I know getaddrinfo() used for DNS lookup. Tell me any method, so that this time is ...
11
votes
3answers
763 views

Two commands, one pipeline

I need these two commands to be one (so I can pipe them further): dig +nottlid -t any bix.hu | egrep -v "^;;|^;|^$" | sort dig +nottlid -t any www.bix.hu | egrep -v "^;;|^;|^$" | sort I mean I ...
58
votes
12answers
75k views

How can I resolve a hostname to an IP address in a Bash script?

What's the most concise way to resolve a hostname to an IP address in a Bash script? I'm using Arch Linux.