Hello alls, I'm trying to sort a file containing accents and numbers, but can't find a way to do this correctly:
- Without -V option, accents are correctly sorted, but not numbers. - With -V option, numbers are correctly sorted, but not accents. Here is an example: echo " A 10 A 9 E 10 E 9 e 10 e 9 é 10 é 9 F 10 f 9 " | sort -f Return: A 10 A 9 e 10 E 10 é 10 e 9 E 9 é 9 F 10 f 9 --> Here accents are correctly sorted according to my locale: they are considered as a non accentuated letter. But numbers are not sorted in mathematical order. `sort -f -V` return: A 9 A 10 e 9 E 9 e 10 E 10 f 9 F 10 é 9 é 10 --> Here, numbers are correctly sorted, but the behavior concerning accents is different than before -- and doesn't respect my locale. Is it a normal behaviour? If so, how can I use sort to respect arithmetic numeral order, *and* my locale order concerning accents? For information: sort (GNU coreutils) 8.17 Linux x32 3.4.5-1-ARCH (Arch linux) LANG=fr_FR.UTF-8 LC_CTYPE="fr_FR.UTF-8" LC_NUMERIC="fr_FR.UTF-8" LC_TIME="fr_FR.UTF-8" LC_COLLATE="fr_FR.UTF-8" LC_MONETARY="fr_FR.UTF-8" LC_MESSAGES="fr_FR.UTF-8" LC_PAPER="fr_FR.UTF-8" LC_NAME="fr_FR.UTF-8" LC_ADDRESS="fr_FR.UTF-8" LC_TELEPHONE="fr_FR.UTF-8" LC_MEASUREMENT="fr_FR.UTF-8" LC_IDENTIFICATION="fr_FR.UTF-8" LC_ALL=fr_FR.UTF-8 Cheers, Pierre-Jean.
