From owner-freebsd-rc@FreeBSD.ORG Sat Feb 22 00:58:12 2014 Return-Path: Delivered-To: rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA4667C3; Sat, 22 Feb 2014 00:58:11 +0000 (UTC) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A0CB410F8; Sat, 22 Feb 2014 00:58:11 +0000 (UTC) Received: from smarthost.fisglobal.com ([10.132.206.192]) by ltcfislmsgpa06.fnfis.com (8.14.5/8.14.5) with ESMTP id s1M0wA2c007735 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 21 Feb 2014 18:58:10 -0600 Received: from THEMADHATTER (10.242.181.54) by smarthost.fisglobal.com (10.132.206.192) with Microsoft SMTP Server id 14.3.174.1; Fri, 21 Feb 2014 18:58:09 -0600 From: Sender: Devin Teske To: "'Tom Evans'" References: <20131228055324.GA72764@aim7400.DataIX.local> <9498BE8E-8090-4E7A-8317-18D29B1DDC08@dataix.net> <7DBA7D58-E925-47BC-967C-F653348426A6@fisglobal.com> <11b901cf2f68$d334f080$799ed180$@FreeBSD.org> In-Reply-To: <11b901cf2f68$d334f080$799ed180$@FreeBSD.org> Subject: RE: network.subr _aliasN handling Date: Fri, 21 Feb 2014 16:58:03 -0800 Message-ID: <11bb01cf2f69$2492dd70$6db89850$@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQHDFDC1SCdF87KsAOMxpeOC5ZIl9wGCXs+0Atrl8x0A2Y7j4AImADvJAP+hhVcBgFtDBgGyymkYmnwsnUA= Content-Language: en-us X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.87, 1.0.14, 0.0.0000 definitions=2014-02-21_06:2014-02-21,2014-02-21,1970-01-01 signatures=0 Cc: rc@freebsd.org, dteske@FreeBSD.org X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Feb 2014 00:58:12 -0000 > -----Original Message----- > From: dteske@FreeBSD.org [mailto:dteske@FreeBSD.org] > Sent: Friday, February 21, 2014 4:56 PM > To: 'Tom Evans' > Cc: rc@freebsd.org; 'Devin Teske' > Subject: RE: network.subr _aliasN handling > > > > > -----Original Message----- > > From: Tom Evans [mailto:tevans.uk@googlemail.com] > > Sent: Friday, February 21, 2014 9:16 AM > > To: Devin Teske > > Cc: rc@freebsd.org > > Subject: Re: network.subr _aliasN handling > > > > On Sat, Jan 4, 2014 at 11:25 AM, Teske, Devin > > > > wrote: > > > On Jan 4, 2014, at 2:59 AM, Jason Hellenthal wrote: > > > > > >> I believe I know what you mean by that but in a way scares me when > > >> you > say > > sort as in mixing up the original order they appear in which I would > > find > to be > > really unattractive to most. > > >> > > > > > > It's not as scary as it sounds. > > > > > > The issue is that the variables are sorted alphabetically, instead > > > of numerically. > > > > > > Let's take four words: foo1, foo2, foo10, and foo20. > > > If you sort them alphabetically, you get: > > > > > > foo1 > > > foo10 > > > foo2 > > > foo20 > > > > > > You'll notice this when doing a directory listing, as that too is > > > sorted alphabetically. > > > > > > This is why "alias14" is run before "alias8" and "alias9". Because > > > they are processed in alphabetically sorted order. I didn't do > > > anything to sort the values, they came pre-sorted in alphabetic order. > > > > > > If I simply throw in a "| sort -n", then it will change it to > numerically sorted. > > > As you might expect, numerically sorting the above list would result in: > > > > > > foo1 > > > foo2 > > > foo10 > > > foo20 > > > > > > Trivial really. I'll throw a patch at you when I get some cycles (soon). > > > > Wouldn't "|sort -n" sort foo10 before foo2? > > > [Devin Teske] > > "| sort -R" seems to work. Though I'm less than pleased with the explanation > from the man-page... > > -R, --random-sort > sort by random hash of keys > > but... say what? Produces foo1, foo2, foo10, foo20 -- as-is desired -- but, is this > really what we want? I'm not sure I understand the above description -- can > someone explain this a bit more? HAH!, I should have re-executed the command to get the joke (on me). Just by chance, I gave it a go and it spat out (first run) foo1, foo2, foo10, foo20 (LoL). Second run of course gave something entirely different (gee, almost... random, LoL). Disregard ;D (LoL again) > -- > Devin _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.