Sort lines of text
Opts | Long Option | Description |
---|---|---|
-b | –ignore-leading-blanks | Ignore leading blanks; sort by first non-whitespace char |
-f | –ignore-case | Make sorting case-insensitive |
-n | –numeric-sort | Sort based on numeric evaluation of a string |
-r | –reverse | Sort in reverse order |
-k | –key=field1[,field2] | sort based on key field located from field1 to field2 |
-m | –merge | Treat each argument as the name of a presorted file |
-o | –output=file | Send sorted output to file |
-t | –filed-separator=char | Define the field-separator by char. Default is spaces or tabs. |
Common sort Options
Example: du -s /usr/share/* | sort -nr | head