network.subr _aliasN handling

dteske at FreeBSD.org dteske at FreeBSD.org
Sat Feb 22 01:17:52 UTC 2014



> -----Original Message-----
> From: John Nielsen [mailto:lists at jnielsen.net]
> Sent: Friday, February 21, 2014 9:06 AM
> To: Devin Teske
> Cc: Jason Hellenthal; rc at freebsd.org; net at freebsd.org
> Subject: Re: network.subr _aliasN handling
> 
> On Jan 4, 2014, at 4:25 AM, Teske, Devin <Devin.Teske at fisglobal.com>
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).
> 
> Hi Devin, Jason-
> 
> I've been behind on my mailing list e-mail for a while, but I really
like the idea
> and the patch proposed here. I don't see anything like it in head yet,
so ... Ping?
> :)
> 
> JN
> 
[Devin Teske] 

*** this time with attached patch.txt ***

Hi JN, here's a new patch that incorporates numerical sorting as well as
what
the original patch set out to do ... make "gaps" possible (so that you
could
comment out an alias without having to renumber all the ones following).

Give it a look, let me know what you think.
-- 
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.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.txt
URL: <http://lists.freebsd.org/pipermail/freebsd-rc/attachments/20140221/e19f6c70/attachment.txt>


More information about the freebsd-rc mailing list