2

I just got aware that sort seems to ignore dollar characters at the beginning of the line. Why is that? Example:

user@host:~$ cat 5.txt
$_a
_b
$_c
user@host:~$ sort 5.txt
$_a
_b
$_c

I have Debian 9.2 Stretch.

jm009
  • 41
  • I didn't immediately find https://unix.stackexchange.com/questions/326936/why-does-this-sort-ignore-the-character-prefix Once I had found it, I would have liked to add a comment with search string "dollar", to help finding it. I couldn't (and still can't) add a comment, because I don't have 50 reputation... – jm009 Nov 26 '17 at 14:48

1 Answers1

2

I found an answer here:

Why does this sort ignore the +/- character prefix?

sort works as expected with

LC_COLLATE=C sort 5.txt
jm009
  • 41