bug#11903: fold should mention what happens if the command is used on multibyte characters

2012-07-10 Thread jidanni
(info "(coreutils) fold invocation") should mention what happens if the
command is used on multibyte characters.

The man page should too.





bug#11900: Sort by month fails if not in first field or first position

2012-07-10 Thread Pádraig Brady
tag 11900 + notabug
close 11900
stop

On 07/10/2012 08:42 AM, j...@smartots.com wrote:
> echo -e "1 qFeb\n1 qJan" | sort -k2.2,2.5M

Yep that's a tricky one, but specified by POSIX.
--debug is very useful here...

$ echo -e "1 qFeb\n1 qJan" | sort --debug -k2.2,2.5M
sort: using ‘en_US.utf8’ sorting rules
sort: leading blanks are significant in key 1; consider also specifying 'b'
1 qFeb
  ^ no match for key
__
1 qJan
  ^ no match for key
__


Now you might think you can just specify -b, but...

$ echo -e "1 qFeb\n1 qJan" | sort --debug -b -k2.2,2.5M
sort: using ‘en_US.utf8’ sorting rules
sort: leading blanks are significant in key 1; consider also specifying 'b'
sort: option '-b' is ignored
1 qFeb
  ^ no match for key
__
1 qJan
  ^ no match for key
__


So you might then think you could add 'b' to the full key, but...

$ echo -e "1 qFeb\n1 qJan" | sort --debug -b -k2.2,2.5Mb
sort: using ‘en_US.utf8’ sorting rules
sort: leading blanks are significant in key 1; consider also specifying 'b'
1 qFeb
  ^ no match for key
__
1 qJan
  ^ no match for key
__


So what you really need to do is:

$ echo -e "1 qFeb\n1 qJan" | sort --debug -k2.2b,2.5Mb
sort: using ‘en_US.utf8’ sorting rules
1 qJan
   ___
__
1 qFeb
   ___
__

cheers,
Pádraig.





bug#11900: Sort by month fails if not in first field or first position

2012-07-10 Thread jim


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