Re: dig: single line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 12 Mar 2009 09:30:00 +1030, Tim wrote:

> On Wed, 2009-03-11 at 22:18 +0000, Mike -- EMAIL IGNORED wrote:
>> Is there a way to get dig to return at most one line?  For example (on
>> FC7), :
>> 
>>    #dig +short +search +nomultiline www.ieee.org a165.g.akamai.net.
>>    204.2.177.34
>>    204.2.177.41
>> 
>> is not exactly "nomultiline".
> 
> I don't think nomultiline does what you think it does.  I suspect, from
> reading the man file, it's about individual records that have multiline
> outputs, not whole query answers that do.  e.g. If a single record, like
> the "a165.g.akamai.net" data, had more information directly associated
> with it.
> 
> But, whatever it actually means, you could tag the following onto the
> end of your command line:  |head -n 1
> 
[...]

I reread the man page, and I agree that +nomultiline is not what I
want. The head suggestion won't work, because in the above example,
it is the second line I want.

Failing a better suggestion, I'll just have to parse the output.
Perhaps I will test each line with inet_aton until I get one that
works.  I was hoping to avoid that.

Mike.

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux