More sort weirdness
by rnturn from LinuxQuestions.org on (#5MH04)
I've seen threads discussing odd results when sorting but the answers seem to revolve around one's locale settings.
I've run into some odd when sorting. On a CentOS VM with no locale settings
Code:$ env|grep ^LC
$ in the environment, I'm seeing:
Code:$ grep ' def ' cb.py | sort | cat -n # Find method names
...
11 def _queue_failed(self, notes):
12 def _queue_rework(self, notes):
13 def set_options(self, task_keys=None, var_options=None, direct=None):
14 def _update_progress(self):
15 def v2_playbook_on_play_start(self, play):
16 def v2_playbook_on_task_start(self, task, is_conditional):
...Surely lines 13 and 14 should be swapped, right?
I get the exact same results on OpenSUSE when env|grep ^LC returns:
Code:$ env|grep ^LC
LC_ALL=
LC_TIME=en_US.UTF-8
$Does anyone understand under what conditions these sort results can possibly be valid? It seems that I'll now have to watch the output of sort(1) like a hawk.
TIA...
I've run into some odd when sorting. On a CentOS VM with no locale settings
Code:$ env|grep ^LC
$ in the environment, I'm seeing:
Code:$ grep ' def ' cb.py | sort | cat -n # Find method names
...
11 def _queue_failed(self, notes):
12 def _queue_rework(self, notes):
13 def set_options(self, task_keys=None, var_options=None, direct=None):
14 def _update_progress(self):
15 def v2_playbook_on_play_start(self, play):
16 def v2_playbook_on_task_start(self, task, is_conditional):
...Surely lines 13 and 14 should be swapped, right?
I get the exact same results on OpenSUSE when env|grep ^LC returns:
Code:$ env|grep ^LC
LC_ALL=
LC_TIME=en_US.UTF-8
$Does anyone understand under what conditions these sort results can possibly be valid? It seems that I'll now have to watch the output of sort(1) like a hawk.
TIA...