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]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux