From owner-freebsd-questions@freebsd.org Fri Sep 15 23:20:24 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6A2DE10D79 for ; Fri, 15 Sep 2017 23:20:24 +0000 (UTC) (envelope-from luzar722@gmail.com) Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AC4988183F for ; Fri, 15 Sep 2017 23:20:24 +0000 (UTC) (envelope-from luzar722@gmail.com) Received: by mail-io0-x22a.google.com with SMTP id l15so11674765iol.8 for ; Fri, 15 Sep 2017 16:20:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-transfer-encoding; bh=9R5IbqxNxlVFk8b2amx/C1m052rX3mxE9RB7utMvsbY=; b=JJ2azskqaaaW4IzbB5qxI6UDj3uClZqbF/Mi7n1wr81488PALZRX6+byLrhCajX03i utWAKSM+mpo0TZD0fMaeW3bIvYJtoK58Q7zs9aQW+g48ePoJOUFW+2KufneD24e8/7J2 9vZShax7y035QWD9REQAcglc77q+3SAK9qhX1L1wZA2pK1+22+3bs5lccU5dS9Y3COzA E2eQhaVdy79/DHMbepRvVZohwd20h4cqfbh684U+41gQhCMwEcO8JG7G2yt5GC0qCLr9 03SSymlpSGYTeOKUM6+//s0Nh+2ss1e7Z7uREQIzcRndwAQwYXeD9MxD4qREYvBcPeqK Jwew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-transfer-encoding; bh=9R5IbqxNxlVFk8b2amx/C1m052rX3mxE9RB7utMvsbY=; b=Nnvmc8GQbNxLVzEgP32Op92F0tvsMbULkWfGTuCNzpa25n0HglJIg8m7RJN+LabwyQ Fei1J6VkyAWQ5H/Hdoy6X3dazIh1uKoCHhtgJgR7FozMjbqvVtmMEDgLv88f0Oq4M0W1 snoBaLLjFcBFEloTXdLINAvC9vOYQl0OUvUs8k2wncWnX0k5W0QI9gZFVRh4VMGxCoK5 60RQbW/SpyqH507MkUH92XfiOiA/aglyDleoLcvKfLQsCnl/DsDbrnlaRSViuCWFEI2C lWI+YPxChrOv++Tbe1aiOsqtteLp6G97xXKBoTWrXswlc1zOEB40MIilHGcAES9BXV7q SqZQ== X-Gm-Message-State: AHPjjUi4MIo5VAe09qoilKHQCV9EgHWsnOps7t1GuyQdIMY/CyPRhjhX fDuANosJNnR/GQ== X-Google-Smtp-Source: AOwi7QAp8S/22Yp8O0Ub2dhUzM+1fccl5snAnE/OIZnzvpUbABmZIQHNkSi5YHnzdlHMzRL8mgt4/g== X-Received: by 10.107.21.133 with SMTP id 127mr9477781iov.209.1505517624085; Fri, 15 Sep 2017 16:20:24 -0700 (PDT) Received: from [10.0.10.3] (cpe-74-141-88-147.neo.res.rr.com. [74.141.88.147]) by smtp.googlemail.com with ESMTPSA id o184sm1039840ioo.48.2017.09.15.16.20.23 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Sep 2017 16:20:23 -0700 (PDT) Message-ID: <59BC6036.8040709@gmail.com> Date: Fri, 15 Sep 2017 19:20:22 -0400 From: Ernie Luzar User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: RW CC: freebsd-questions@freebsd.org Subject: Re: Help scripting dns lookup using awk References: <59BB24E4.6060908@gmail.com> <20170915143019.2e02d386@gumby.homeunix.com> In-Reply-To: <20170915143019.2e02d386@gumby.homeunix.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Sep 2017 23:20:25 -0000 RW via freebsd-questions wrote: > On Thu, 14 Sep 2017 20:55:00 -0400 > Ernie Luzar wrote: > >> The following sh script works, but runs very slow. > > Almost certainly the reason it's slow is that you are doing sequential > synchronous lookups. Switching to another language isn't going help > much. To speed it up you either need to switch to a language with a > DNS library that supports asynchronous lookups or fire-off parallel > child processes. The latter is easier. > How would I go about coding a sh script to fire-off parallel child processes?