On Oct 21, 2014, at 4:00 PM, Evan Hunt wrote:
On Tue, Oct 21, 2014 at 12:07:15PM -0700, Warren Kumari wrote:
dig A $name | awk '$0 ~ /status/ $0 !~ /status: NOERROR,/ {
sub(,, , $6 ); print $6; x=1
}
$4 == A { print $5; x=1 }
It's interesting to see the discussion about trying to turn dig into
something it isn't. :) It's a really good DNS diagnostic tool, but if
you just want to get the answer for a query, host does the job quite
well, with a lot less fuss.
Doug
___
On 10/21/14 8:31 PM, Frank Bulk wrote:
Dave,
Thanks for the input, but what I was looking for was a dig command that
returns the IP(s) or a fail. It looks like the host command is the right
solution in this case, not dig.
Yep. :)
You can check the return value of the call to get your fail
Anytime you see 'grep' and 'cut' used together, they can usually be
shortened to just 'awk', which requires starting one less process. And if
this case it splits fields the way a users sees them, so the same code
works in both cases:
$ dig +noall +answer home.kreme.com in a | awk '/[\t ]A[\t ]/
In article mailman.1128.1414072988.26362.bind-us...@lists.isc.org,
Bob Harold rharo...@umich.edu wrote:
Anytime you see 'grep' and 'cut' used together, they can usually be
shortened to just 'awk', which requires starting one less process. And if
this case it splits fields the way a users
At Thu, 23 Oct 2014 15:17:49 +0100,
Sam Wilson wrote:
In article mailman.1128.1414072988.26362.bind-us...@lists.isc.org,
Bob Harold rharo...@umich.edu wrote:
Anytime you see 'grep' and 'cut' used together, they can usually be
shortened to just 'awk', which requires starting one less
At Thu, 23 Oct 2014 15:17:49 +0100,
Sam Wilson wrote:
In article mailman.1128.1414072988.26362.bind-us...@lists.isc.org,
Bob Harold rharo...@umich.edu wrote:
Anytime you see 'grep' and 'cut' used together, they can usually be
shortened to just 'awk', which requires starting one less
At Tue, 21 Oct 2014 22:31:28 -0500,
Frank Bulk wrote:
Dave,
Thanks for the input, but what I was looking for was a dig command that
returns the IP(s) or a fail. It looks like the host command is the right
solution in this case, not dig.
Doesn't egrep fail on no match?
Niall
On Oct 22, 2014, at 5:56, Niall O'Reilly niall.orei...@ucd.ie wrote:
At Tue, 21 Oct 2014 22:31:28 -0500,
Frank Bulk wrote:
Dave,
Thanks for the input, but what I was looking for was a dig command that
returns the IP(s) or a fail. It looks like the host command is the right
solution in
On 21 Oct 2014, at 22:46 , Jim Young jyo...@gsu.edu wrote:
On 10/22/14 12:08 AM, LuKreme krem...@kreme.com wrote:
On 21 Oct 2014, at 19:20 , Dave Knight d...@knig.ht wrote:
$ dig +noall +answer dave.knig.ht in a | egrep 'IN\tA\t' | cut -f6
216.235.14.46
Interesting. This works for
On Mon, Oct 20, 2014 at 1:19 PM, Mark Andrews ma...@isc.org wrote:
Why do we need to have a option to dig to massage the results into
every possible different form?
dig A $name | awk '$0 ~ /status/ $0 !~ /status: NOERROR,/ {
sub(,, , $6 ); print $6; x=1
On Tue, Oct 21, 2014 at 12:07:15PM -0700, Warren Kumari wrote:
dig A $name | awk '$0 ~ /status/ $0 !~ /status: NOERROR,/ {
sub(,, , $6 ); print $6; x=1
}
$4 == A { print $5; x=1 }
END { if (!x) print
[mailto:bind-users-boun...@lists.isc.org] On Behalf Of Warren Kumari
Sent: Tuesday, October 21, 2014 3:07 PM
To: Mark Andrews
Cc: bind-us...@isc.org
Subject: Re: Digging to the final IP
On Mon, Oct 20, 2014 at 1:19 PM, Mark Andrews ma...@isc.org wrote:
Why do we need to have a option to dig to massage
On Oct 19, 2014, at 1:26, Frank Bulk frnk...@iname.com wrote:
Is there a dig option that will list out the final (IPs) or query result??
By default, even with +short, it can list intermediate CNAME(s) and not what
IP(s) that CNAME may have.
For example,
root@nagios:/tmp# dig
*Note: UMDNJ is now Rutgers-Biomedical and Health Sciences*
|| \\UTGERS |-*O*-
||_// Biomedical | Ryan Novosielski - Senior Technologist
|| \\ and Health | novos...@rutgers.edumailto:novos...@rutgers.edu-
973/972.0922 (2x0922)
|| \\ Sciences |
21, 2014 8:21 PM
To: Frank Bulk
Cc: bind-users
Subject: Re: Digging to the final IP
On Oct 19, 2014, at 1:26, Frank Bulk frnk...@iname.com wrote:
Is there a dig option that will list out the final (IPs) or query result??
By default, even with +short, it can list intermediate CNAME(s
On 21 Oct 2014, at 19:20 , Dave Knight d...@knig.ht wrote:
$ dig +noall +answer dave.knig.ht in a | egrep 'IN\tA\t' | cut -f6
216.235.14.46
Interesting. This works for me:
dig +noall +answer home.kreme.com in a | egrep '\tA' | cut -f5
but on your example, it requires -f6
And yet, the
# dig +noall +answer dave.knig.ht a|awk '/IN\tA\t/ {print $NF}'
216.235.14.46
signature.asc
Description: OpenPGP digital signature
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe
from this list
bind-users mailing
On 10/22/14 12:08 AM, LuKreme krem...@kreme.com wrote:
On 21 Oct 2014, at 19:20 , Dave Knight d...@knig.ht wrote:
$ dig +noall +answer dave.knig.ht in a | egrep 'IN\tA\t' | cut -f6
216.235.14.46
Interesting. This works for me:
dig +noall +answer home.kreme.com in a | egrep '\tA' | cut -f5
If all you are after is one of the final IP addresses (not the entire
set), then using a dumb client might be easier. For instance, 'ping'.
$ ping -q -c1 www.google.com
PING www.google.com (203.66.155.113): 56 data bytes
If you want to get more than one IP address, then you'll need an
-protocols-dns-b...@isc.org
Subject: Re: Digging to the final IP
What are you using this for?
If it's part of a script, it might be easier to just use gethostbyname. For
example, in php: http://php.net/manual/en/function.gethostbyname.php , Returns
the IPv4 address or a string containing
On 20/10/14 14:22, Frank Bulk (iname.com) wrote:
We’re using this in a bash shell script. I don’t think there’s a native
shell command to get the IP, so I’ll use a mixture of host and dig as
necessary.
If your system has it, try getent e.g.
getent ahosts hostname
Why do we need to have a option to dig to massage the results into
every possible different form?
dig A $name | awk '$0 ~ /status/ $0 !~ /status: NOERROR,/ {
sub(,, , $6 ); print $6; x=1
}
$4 == A { print $5; x=1 }
That feature runs on our system, but it doesn't digging through to a final
IP or failure:
getent ahosts mail.automatedwastesystems.net
returns nothing.
Regards,
Frank
-Original Message-
From: bind-users-boun...@lists.isc.org
[mailto:bind-users-boun...@lists.isc.org] On Behalf
On Sun, 2014-10-19 at 00:26 -0500, Frank Bulk wrote:
Is there a dig option that will list out the final (IPs) or query result??
By default, even with +short, it can list intermediate CNAME(s) and not what
IP(s) that CNAME may have.
Not great, but might be enough to be helpful:
dig
Would host be closer to what you want?
--
Best regards
Sten Carlsen
No improvements come from shouting:
MALE BOVINE MANURE!!!
On 19 Oct 2014, at 08:05, Karl Auer ka...@biplane.com.au wrote:
On Sun, 2014-10-19 at 00:26 -0500, Frank Bulk wrote:
Is there a dig option that will list
In article mailman.1097.1413711142.26362.bind-us...@lists.isc.org,
Sten Carlsen st...@s-carlsen.dk wrote:
Would host be closer to what you want?
Host also tells you about aliases it encounters along the way.
--
Best regards
Sten Carlsen
No improvements come from shouting:
-protocols-dns-b...@isc.org
Subject: Re: Digging to the final IP
In article mailman.1097.1413711142.26362.bind-us...@lists.isc.org,
Sten Carlsen st...@s-carlsen.dk wrote:
Would host be closer to what you want?
Host also tells you about aliases it encounters along the way.
--
Best regards
Margolin
Sent: Sunday, October 19, 2014 5:00 AM
To: comp-protocols-dns-b...@isc.org
Subject: Re: Digging to the final IP
In article mailman.1097.1413711142.26362.bind-us...@lists.isc.org,
Sten Carlsen st...@s-carlsen.dk wrote:
Would host be closer to what you want?
Host also tells you about
Is there a dig option that will list out the final (IPs) or query result??
By default, even with +short, it can list intermediate CNAME(s) and not what
IP(s) that CNAME may have.
For example,
root@nagios:/tmp# dig mail.automatedwastesystems.net +short
mail3.sandhills.com.
30 matches
Mail list logo