Bug#738526: sort: weird(might wrong) sorting result

2014-02-11 Thread Pádraig Brady
On 02/10/2014 08:56 AM, Adam Lee wrote: > echo -e "c = c\nca = ca\ncm = cm"|sort $ echo -e "c = c\nca = ca\ncm = cm"| LANG=C sort c = c ca = ca cm = cm This is a FAQ, but you need to explicitly set the C locale to avoid your locale collating rules. thanks, Pádraig. -- To UNSUBSCRIBE, email

Bug#738526: sort: weird(might wrong) sorting result

2014-02-10 Thread Adam Lee
Pádraig's mail was missed by bug-tracking system? Quoted here for reference. On Mon, Feb 10, 2014 at 09:48:00AM +, Pádraig Brady wrote: > On 02/10/2014 08:56 AM, Adam Lee wrote: > > echo -e "c = c\nca = ca\ncm = cm"|sort > > $ echo -e "c = c\nca = ca\ncm = cm"| LANG=C sort > c = c > ca = c

Bug#738526: sort: weird(might wrong) sorting result

2014-02-10 Thread Adam Lee
Package: coreutils Version: 8.21-1 Severity: important Why does the sort command process [1] to [2]? [1]: c = c ca = ca cm = cm [2]: ca = ca c = c cm = cm Just run this: echo -e "c = c\nca = ca\ncm = cm"|sort, it's really weird, seems like sort ignores " " and "=" -- System Information: Deb