GNU bug report logs - #17017
Fw: sort program question my error

Previous Next

Package: coreutils;

Reported by: Leslie S Satenstein <lsatenstein <at> yahoo.com>

Date: Sat, 15 Mar 2014 14:48:01 UTC

Severity: normal

Merged with 17016

Done: Bob Proulx <bob <at> proulx.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17017 in the body.
You can then email your comments to 17017 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#17017; Package coreutils. (Sat, 15 Mar 2014 14:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leslie S Satenstein <lsatenstein <at> yahoo.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sat, 15 Mar 2014 14:48:02 GMT) Full text and rfc822 format available.

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

From: Leslie S Satenstein <lsatenstein <at> yahoo.com>
To: "bug-coreutils <at> gnu.org" <bug-coreutils <at> gnu.org>
Subject: Fw: sort program question my error 
Date: Sat, 15 Mar 2014 07:46:41 -0700 (PDT)
[Message part 1 (text/plain, inline)]
Disregard my previous posting

In my doc, I did not apply export as ...


#!/bin/bash
export LC_ALL=C


Without the export 

then sort -f and -k1d is required (see below)

 
Regards 

 Leslie

Mr. Leslie Satenstein
SENT FROM MY OPEN SOURCE LINUX SYSTEM.



----- Forwarded Message -----
>From: Leslie S Satenstein <lsatenstein <at> yahoo.com>
>To: "bug-coreutils <at> gnu.org" <bug-coreutils <at> gnu.org> 
>Sent: Saturday, March 15, 2014 8:52 AM
>Subject: sort program question -- bug with program, or documentation or my misunderstanding 
> 
>
>
>Hi
>My first posting.
>
>
>I believe there is an omission in man pages for the sort in the Description 
area section.  One cannot successfully use -d or without including -f on the 
line. Refer to  man sort under Description
>
> -d, --dictionary-order
>              consider only blanks and alphanumeric characters
>
>
>
>
>I have the following lines in a file   (see below as justification)
>
>
>I want a file sorted as straight ascii sort.  I  eventually developed the two alternate command lines shown below, for two different purposes.
>
>
>The undocumented bug is the requirement for the    -f    to be specified in order to have the sort work in the first of the two ASCII examples shown below,
>otherwise the leading blank is ignored.
>
>The first sort did not work for me unless the -f is specified.  Nowhere in the man page does it stipulate that for -d option the -f must be specified.
>That is the bug.
> 
>Did I not understand man  sort         or   info sort     (linux fedora 20)       ?
>
>Here are the two command lines and some sample lines as justification for my posting. I wish to sort a file shown below within the === by the first column
>The following is the demo script
>
>
>#!/bin/bash
>LC_ALL=C
># to sort in ascii sequence where line ABCabc comes before abc       use the following
>sort  -f -k1d -t '|'  x                         -o ABCabc
># output will have lines with leading ABC text occurring before abc as per ascii table.
># The sort will not work if the -f is omitted.
>
># The undocumented requirement is the need to specify  the -f
>#
># to sort folding the in folded ascii sequence, where lines with sequence ABCbac sorts as AaBbCc ... use the following
># This part of the man pages is correct.  Except we may specify the folding option in two ways
>
>sort -t '|' -k1f  x                                  -o  AaBbCc
>or the line with    sort -f -t '|' -k1 x        -o AaBbCc
>  
>
>Try the first command or varients without the -f  to sort in column 1 ascending sequence
>
>
>
>Here is a text file, between the === to paste into VI   Save it as x . and try to get the sort against the lines 
>
>NB, the leading blank for line 1 is to force the line to be first in the output
>
>
>
>========
>
> Host=fedora20.fedora20          |             |                               scan from  /home/leslie/Development/scandir
>crc32.h                          |20140314 1736|bb96da74aa636110b822d116afbe36d82c1c0861|/home/leslie/Development/scandir
>md5.h                            |20140314
 1736|544728de8b8dc476109922cf5601a7cd6a103916|/home/leslie/Development/scandir
>ABCbac                           |20140314 1901|6626094e11fee60bbe73529bd440a43961c022ce|/home/leslie/Development/scandir
>scandir32.c                      |20140314 1738|1526c725bf00d8268b5319b125cebd2fbb001542|/home/leslie/Development/scandir
>date1                            |20140314
 1901|97294e445cb75e611805024d5461bd07807e9157|/home/leslie/Development/scandir
>sha1.o                           |20140314 1736|1ba673cd46bb246f7f380dc862f93b4737c1305c|/home/leslie/Development/scandir
>dirdepth.c                       |20140314 1736|8779adf41bce65b45f597ba3731db55e81aa718a|/home/leslie/Development/scandir
>md5Good.tar                      |20140314 1736|87ca9e022705250fe2635f87801bbf0fd2df0a0f|/home/leslie/Development/scandir
>crc32.c                         
 |20140314 1736|cb8e353eedecba7d1c0fa2bdd871a508301b10d3|/home/leslie/Development/scandir
>scandir32                        |20140314 1738|ddc187abd0a991183f0d148ed1f069169c5b67ab|/home/leslie/Development/scandir
>md5.c                            |20140314 1736|291145c0b852ec5cff52b361f2be75886f116bee|/home/leslie/Development/scandir
>md5                              |20140314
 1736|a766f710c7f007fa930c808f1a25464f6c7fb1ae|/home/leslie/Development/scandir
>scandir                          |20140314 1738|525b14d0c2ed42d7c6df168ad9606573df3fa97c|/home/leslie/Development/scandir
>dirent.h                         |20140314 1736|281be8444edc7fdaf561cab6f86e80911f425041|/home/leslie/Development/scandir
>test.sh                          |20140314
 1736|7ebc56b604211a222c5a3fa6caf811207134fb3f|/home/leslie/Development/scandir
>makefile                         |20140314 1736|8c13260814f42acb544cfd3eda64daf7a26241f3|/home/leslie/Development/scandir
>sort.how                         |20140314 1859|08aff8bec844bbe8684f24e9e0e5635d73a0f364|/home/leslie/Development/scandir
>scandirmd5                       |20140314 1738|525b14d0c2ed42d7c6df168ad9606573df3fa97c|/home/leslie/Development/scandir
>crc32.o                         
 |20140314 1736|0f3c8739e6ebc6b5d2c553687886fe47df1aa39c|/home/leslie/Development/scandir
>DATE2                            |20140314 1736|c31bd337d70c8d39ada367a889d623e19cd3c995|/home/leslie/Development/scandir
>date2                            |20140314 1901|97294e445cb75e611805024d5461bd07807e9157|/home/leslie/Development/scandir
>sha1.h                          
 |20140314 1736|017eefa93cc9fe477881fa0986465b0a125b5aa5|/home/leslie/Development/scandir
>scandirsha1.c                    |20140314 1738|a4ea776b95cb87047188353527128262d1059990|/home/leslie/Development/scandir
>blacklist.txt                    |20140314 1736|28ec0b1ef6be98a520366ea63938e0a436b1db78|/home/leslie/Development/scandir/SOX/var
>======
>
>
>Trying different variations of the sort with the above file leads to some results that do not appear to me to be correct.
>I have specified locale, and with some variants, locale
 appears to be ignored.  The above file is as ASCII text, not utf8
>
> 
>Regards 
>
> Leslie
>
>Mr. Leslie Satenstein
> 
>
>
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#17017; Package coreutils. (Sat, 15 Mar 2014 18:13:01 GMT) Full text and rfc822 format available.

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

From: Bob Proulx <bob <at> proulx.com>
To: Leslie S Satenstein <lsatenstein <at> yahoo.com>
Cc: 17017 <at> debbugs.gnu.org
Subject: Re: bug#17017: Fw: sort program question my error
Date: Sat, 15 Mar 2014 12:11:59 -0600
forcemerge 17016 17017
close 17016
thanks

Leslie S Satenstein wrote:
> >My first posting.

Welcome to the community!  Let me gently nudge you to use the
coreutils <at> gnu.org mailing list for questions and discussion.  Sending
bug reports to the bug-coreutils address opens a bug ticket for each
new message there.  Your two messages one after the other opened up
two seperate bug tickets.

> Disregard my previous posting

Because the two bug tickets are open I am merging them together and
closing them with this message.  That is what the merge and close
commands above do.  Open bug tickets mean that the issue won't get
forgotten and therefore cannot be ignored or disregarded.

> In my doc, I did not apply export as ...
> 
> #!/bin/bash
> export LC_ALL=C
> Without the export 

Yes.  Needs the export.

This is actually a libc locale collation ordering issue.  When libc
changed every other piece of software on the system was affected and
not just sort.  And as you might imagine this is also an FAQ.  Please
see the FAQ entry for the standard answer to these questions.

  http://www.gnu.org/software/coreutils/faq/#Sort-does-not-sort-in-normal-order_0021

I hope this doesn't put you off posting questions, issues, or bugs in
the future.  We welcome your participation.  Please do so on the
coreutils <at> gnu.org mailing list.  No bug tracking system there.  Just a
discussion list.  :-)

Bob




Forcibly Merged 17016 17017. Request was from Bob Proulx <bob <at> proulx.com> to control <at> debbugs.gnu.org. (Sat, 15 Mar 2014 18:13:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 17016 <at> debbugs.gnu.org and Leslie S Satenstein <lsatenstein <at> yahoo.com> Request was from Bob Proulx <bob <at> proulx.com> to control <at> debbugs.gnu.org. (Sat, 15 Mar 2014 18:13:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 13 Apr 2014 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 121 days ago.

Previous Next


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