Bug 141371 - Shell command sort options unusable or strange defaults
Summary: Shell command sort options unusable or strange defaults
Status: RESOLVED INVALID
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Final
Hardware: Other Other
: P5 - None : Normal
Target Milestone: ---
Assignee: Andreas Schwab
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-04 10:02 UTC by Dirk Stoecker
Modified: 2006-01-11 14:22 UTC (History)
1 user (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Stoecker 2006-01-04 10:02:52 UTC
The shell sort command has at least these 2 options always turned on in case you use German language:

  -d, --dictionary-order
  -f, --ignore-case

As there is no way to reverse the effect of any default options (except there is a hidden not-documented way I do not know) it is impossible to do normal sorts.

Only with the workaround of LC_ALL=C it is possible to do normal sort (and only from shell context and with loosing native language).

Either the default options should be same for all the languages (which I would prefer especially when thinking about scripts using sort) or there should be reverse-options to everthing which can get turned on by default.
Comment 1 Dr. Werner Fink 2006-01-09 11:39:57 UTC
The default sorting order is provided by your language setup.
If you do not like german sorting order and prefer plain POSIX
rules you may use

         LC_COLLATE=POSIX
         export LC_COLLATE

Nevertheless I will not break global localization for all
users.
Comment 2 Dirk Stoecker 2006-01-09 12:28:59 UTC
That is not the point. I don't complain about the defaults.

The problem is, that a user cannot change the settings, when in non-english mode (whereas an english user can). There are no negative forms for the related options (when they are turned on).

As sort is probably a GNU tool, a added "!" in the getopt arguments will add the negative form and thus fix this (additionally requiring manual page updates as well thought).

Setting LC_COLLATE or any other environment variable is no acceptable workaround. There are to many side effects and restrictions to this.
Comment 3 Andreas Schwab 2006-01-11 13:25:49 UTC
This is how LC_COLLATE is supposed to work.
Comment 4 Dirk Stoecker 2006-01-11 14:22:46 UTC
To RESTRICT a user to locales defaults? I cannot believe this. Sorry.

Maybe I live in a different world, but I see a big difference between default settings and the IMPOSSIBILITY to change settings.

Thought, as it seems instead of fixing the bug it will be handled as invalid again, I will no reopen it. Seems SuSE goes the Microsoft way: "It's not a bug, it's a feature".