[sf-lug] SFLUG.org ...

Michael Paoli Michael.Paoli at cal.berkeley.edu
Sat Apr 13 08:40:27 PDT 2019


Ditto - works fine on mine:
Debian GNU/Linux 9.8 (stretch) x86_64
$ whois sf-lug.org | grep 'Name Server' | awk '{print $3}' | xargs -L 1 host
ns1.linuxmafia.com has address 198.144.195.186
ns.primate.net has address 198.144.194.12
ns.primate.net has IPv6 address 2001:470:1f04:51a::2
ns1.svlug.org has address 64.62.190.98
ns1.svlug.org has IPv6 address 2600:3c01::f03c:91ff:fe96:e78e
ns1.svlug.org mail is handled by 10 mail.svlug.org.
ns1.sf-lug.org has address 198.144.194.238
ns1.sf-lug.org has IPv6 address 2001:470:1f04:19e::2
$

> From: "Ken Shaffer" <kenshaffer80 at gmail.com>
> Subject: Re: [sf-lug] SFLUG.org ...
> Date: Sat, 13 Apr 2019 08:11:00 -0700

> Rick,
> Another data point:
> Your posted xargs  version (cut and pasted) works fine on my system,
> Ubuntu 18.04, bash shell.
> Ken
>
> On 4/13/19, Rick Moen <rick at linuxmafia.com> wrote:
>> I wrote:
>>
>>> [...]  Always, the host(1) invocation returns 'not found: 3(NXDOMAIN)',
>>> and my best guess is there's some weirdness involving quoting and
>>> subshells -- which is a good guess in shell scripting at the best of
>>> times.
>>
>> Re-inventing the thing as a 'for' loop instead of using xargs, I run
>> into the same problem on the last snippet following the last pipe,
>> because host(1) isn't getting its intended argument.  (Variable $ns is
>> getting either not dereferenced or wrongly dereferenced.)
>>
>> $ for ns in $(whois sf-lug.org | grep 'Name Server' | awk '{print $3}'); do
>> host $ns; done
>>  not found: 3(NXDOMAIN)
>>  not found: 3(NXDOMAIN)
>>  not found: 3(NXDOMAIN)
>>  not found: 3(NXDOMAIN)
>> $
>>
>> Showing that everything is fine up to the snippet after the final pipe:
>>
>> $ for ns in $(whois sf-lug.org | grep 'Name Server' | awk '{print $3}'); do
>> echo $ns; done
>> NS1.LINUXMAFIA.COM
>> NS.PRIMATE.NET
>> NS1.SVLUG.ORG
>> NS1.SF-LUG.ORG
>> $
>>
>> Probably something dumb and simple, but I'll have to sleep on it so
>> as to look at it with fresh eyes.
>>
>>
>> _______________________________________________
>> sf-lug mailing list
>> sf-lug at linuxmafia.com
>> http://linuxmafia.com/mailman/listinfo/sf-lug
>> SF-LUG is at http://www.sf-lug.org/
>>
>
> _______________________________________________
> sf-lug mailing list
> sf-lug at linuxmafia.com
> http://linuxmafia.com/mailman/listinfo/sf-lug
> SF-LUG is at http://www.sf-lug.org/
>





More information about the sf-lug mailing list