Ancient sort version?
Tom H
tomh0665 at gmail.com
Mon Aug 5 20:27:28 UTC 2013
On Mon, Aug 5, 2013 at 4:10 PM, Linda <haniganwork at earthlink.net> wrote:
> On 08/05/2013 01:56 PM, Mike Kupfer wrote:
>> Kevin O'Gorman wrote:
>>
>> So "sort +2" is equivalent to "sort -k 3". cheers, mike
>
> Just curious what -k denotes I checked man sort and it says start a key at
> POS1 end at POS2 but I'm not sure what that means. So what is a key?
> I've always used -t and sorted by fields just curious what it means to sort
> by a key.
"-t" --> field specifier (the default is a space).
"-k" --> column to be used for sorting (the default is 1).
For example, "sort -n -t: -k3 /etc/passwd" sorts according to the uid.
More information about the ubuntu-users
mailing list