[sf-lug] SFLUG.org ...
Ken Shaffer
kenshaffer80 at gmail.com
Sat Apr 13 08:11:00 PDT 2019
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/
>
More information about the sf-lug
mailing list