_ _ ___ | |__ __ _ _______ | |_ / _ \| '_ \ / _` |_ / _ \| __| | (_) | | | | (_| |/ / (_) | |_ \___/|_| |_|\__,_/___\___/ \__|
| ohazot | docs | links | dev | conf | txt |
| es | en (only, es pending / solamente en, es pendiente) |
| mdoc file |
| search |
sort —
usage and examples
| -u | | unique, suppress duplicate lines. |
| -h | | human numeric sort. |
| -r | | reverse order. |
| -R | | random sort. |
| -k [N] | | sort by field N. |
| -t [C] | | use C as field separator, the default separator is space. |
Examples
$ cat test a 1,12 b 3,100 d 2,1 c 10,14 b 3,100 $ cat test | sort -u a 1,12 b 3,100 c 10,14 d 2,1 $ cat test | sort -u -k2 a 1,12 c 10,14 d 2,1 b 3,100 $ cat test | sort -u -k2 -h a 1,12 d 2,1 b 3,100 c 10,14 $ cat test | sort -u -k2 -h -t "," d 2,1 a 1,12 c 10,14 b 3,100 $ cat t | sort -k2 -h -t "," d 2,1 a 1,12 c 10,14 b 3,100 b 3,100
TODO
| - Translate to Spanish. |
HISTORY
| 2026-06-02 | : Created. |