From owner-freebsd-questions@freebsd.org Thu Sep 14 15:09:49 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 31C71E1E53C for ; Thu, 14 Sep 2017 15:09:49 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from bede.home.qeng-ho.org (bede.qeng-ho.org [217.155.128.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "fileserver.home.qeng-ho.org", Issuer "fileserver.home.qeng-ho.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B2F627C89A for ; Thu, 14 Sep 2017 15:09:47 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from arthur.home.qeng-ho.org (arthur.home.qeng-ho.org [172.23.1.2]) by bede.home.qeng-ho.org (8.15.2/8.15.2) with ESMTP id v8EF9c6m069960; Thu, 14 Sep 2017 16:09:39 +0100 (BST) (envelope-from freebsd@qeng-ho.org) Subject: Re: Is it possible to sort a key field right to left To: Ernie Luzar , "freebsd-questions@freebsd.org" References: <59BA9B3C.5010106@gmail.com> From: Arthur Chance Message-ID: <575efb73-35e2-bd8c-4c9b-54c30e419686@qeng-ho.org> Date: Thu, 14 Sep 2017 16:09:38 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <59BA9B3C.5010106@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB 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: Thu, 14 Sep 2017 15:09:49 -0000 On 14/09/2017 16:07, Ernie Luzar wrote: > I have a file containing a list of host domain names known to contain > viruses. > > I want to sort the host names from right to left so they are grouped > together by like host name suffixes. > > Is this possible? Try this to see if it does what you want. outfile -- An amusing coincidence: log2(58) = 5.858 (to 0.0003% accuracy).