Skip to Content
gnux

-n, --numeric-sort

Compare according to string numerical value.

An option of sortx.

Usage

sortx -n [FILE]...
sortx --numeric-sort [FILE]...

Details

ShortLongValueDefaultMeaning
-n--numeric-sortnonecompare according to string numerical value

Examples

Sort numbers by value rather than as text

sortx -n numbers.txt
sortx -rn numbers.txt | headx -n 3

Help in the terminal

gnux help sortx --numeric-sort

On this page