GNU bug report logs - #11900
Sort by month fails if not in first field or first position

Previous Next

Package: coreutils;

Reported by: jim <at> smartots.com

Date: Tue, 10 Jul 2012 16:07:02 UTC

Severity: normal

Tags: notabug

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jim <at> smartots.com
To: bug-coreutils <at> gnu.org
Subject: Sort by month fails if not in first field or first position
Date: Tue, 10 Jul 2012 15:42:02 +0800 (HKT)

If I put a month in any column other than the first, at any position than the first, sort fails-

> echo -e "1 qFeb\n1 qJan" | sort -k2.2,2.5M
1 qFeb
1 qJan

The following all *DO* work, however:


#First column, not first position
> echo -e "qFeb\nqJan" | sort -k1.2,1.5M
qJan
qFeb

#Second column, first position
> echo -e "1 Feb\n1 Jan" | sort -k2.1,2.4M
1 Jan
1 Feb

#Second column, full key
> echo -e "1 Feb\n1 Jan" | sort -k2M
1 Jan
1 Feb






This bug report was last modified 12 years and 318 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.