When I sort
foo1, I expect
foo to come first, which is what happens ordinarily with unix
$ echo -e "foo1\nfoo" | sort foo foo1
But when I add and underscore and use the
-k options, it doesn't produce the same sort order.
$ echo -e "foo1_3\nfoo_3" | sort -t_ -k1 foo1_3 foo_3
What is the correct set of options to use to make
foo_3 come before
foo1_3? I have
LC_COLLATE=C and am on Ubuntu 14.04.