[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sort by last column with key=-1

From: Paul Eggert
Subject: Re: sort by last column with key=-1
Date: Fri, 01 Dec 2006 11:28:01 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Remko Bolt <address@hidden> writes:

> Would you consider supporting negative keys to facilitate sorting by the last
> column with --key=-1?

That makes sense to me, yes.  I suppose key 0 could be the entire
line, so key -0 would be equivalent to key 0.

One other idle thought: currently 'sort -k 9999999999999999999999999999'
complains, but there's no real reason for it to complain; it could
just silently ignore the key.  Even if infinite-precision arithmetic
were supported that key can't possibly contribute to the comparison,
since the input record can't possibly contain that many keys due to
size_t limitations.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]