sort
depende da localidade. Experimente:
$ LC_ALL=C sort file
n b
n c
n a
Compare o texto acima com:
$ LC_ALL="en_US.UTF-8" sort file
n a
n b
n c
Documentação
De man sort
:
* WARNING * The locale specified by the environment affects sort order. Set LC_ALL=C to get the traditional sort order that uses native byte values.