From owner-freebsd-rc@FreeBSD.ORG Fri Feb 21 17:16:18 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 9BD92344; Fri, 21 Feb 2014 17:16:18 +0000 (UTC) Received: from mail-lb0-x233.google.com (mail-lb0-x233.google.com [IPv6:2a00:1450:4010:c04::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EB6FA167E; Fri, 21 Feb 2014 17:16:17 +0000 (UTC) Received: by mail-lb0-f179.google.com with SMTP id l4so2513947lbv.38 for ; Fri, 21 Feb 2014 09:16:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=8/3GiCUps9suVtxRZ6+6AN7qHJnb9M510gNWLiSLLqU=; b=TcqO+5I7EH99mKcxeYZC/f6y45CKVa/SAREmRsvCyM2MC6FpmK2WwDdW+l4Gq8wq8L L3PU7doTG5P5QV1sy0uTUJBYr96Ev/PjkwVpOKH8p9got+NBImxY61ruiSWM44Qz612T CvZXaFgukTWw1zCKBPXfORcGNNukCSmQU6wYbZqL11rxns7v7yXhh1WCIvGJxQANh6Xe f8/jnnonl9FE4DtZuyxqdgXPfmWTEnPoKqDMKSIK6EUBTJKsiI01tyPduNkhc774BCaq Ic0SzZUu9fhU7SPP9xOHaKIjQpxKgHKMLvQtIuOsiSVw+KuAkS9pMZseSzUYaGLWrZF7 b68g== MIME-Version: 1.0 X-Received: by 10.152.44.225 with SMTP id h1mr4888805lam.71.1393002975027; Fri, 21 Feb 2014 09:16:15 -0800 (PST) Received: by 10.112.35.167 with HTTP; Fri, 21 Feb 2014 09:16:14 -0800 (PST) In-Reply-To: References: <20131228055324.GA72764@aim7400.DataIX.local> <9498BE8E-8090-4E7A-8317-18D29B1DDC08@dataix.net> <7DBA7D58-E925-47BC-967C-F653348426A6@fisglobal.com> Date: Fri, 21 Feb 2014 17:16:14 +0000 Message-ID: Subject: Re: network.subr _aliasN handling From: Tom Evans To: Devin Teske Content-Type: text/plain; charset=UTF-8 Cc: "rc@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: Fri, 21 Feb 2014 17:16:18 -0000 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? Cheers Tom