|
发表于 2006-1-22 23:14:36
|
显示全部楼层
[HTML]Note that if you had written `-k 2n' instead of `-k 2,2n' `sort'
would have used all characters beginning in the second field and
extending to the end of the line as the primary _numeric_ key. For
the large majority of applications, treating keys spanning
more than one field as numeric will not do what you expect.
Also note that the `n' modifier was applied to the field-end
specifier for the first key. It would have been equivalent to
specify `-k 2n,2' or `-k 2n,2n'. All modifiers except `b' apply
to the associated _field_, regardless of whether the modifier
character is attached to the field-start and/or the field-end part
of the key specifier.
[/HTML]
2的意思好理解,n 即是 -n |
|