network.subr _aliasN handling
Tom Evans
tevans.uk at googlemail.com
Fri Feb 21 17:16:18 UTC 2014
On Sat, Jan 4, 2014 at 11: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).
Wouldn't "|sort -n" sort foo10 before foo2?
Cheers
Tom
More information about the freebsd-rc
mailing list