On 08/12/17 05:57, Peng Yu wrote: > printf '%s\n' .1 1 NA | sort -k 1,1rg
Well conversion errors are guaranteed to be put at the start. Is that sufficient? Currently there is no way to change that. $ printf '%s\n' -1 0 1 NA2 NA1 | sort -k 1,1g --debug -s sort: using ‘en_IE.UTF-8’ sorting rules NA2 ^ no match for key NA1 ^ no match for key -1 __ 0 _ 1 _ Often DSU (Decorate Sort Undecorate) is useful, and one could convert NA to/from inf or nan. cheers, Pádraig
