aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/sort.c
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2018-12-04 14:22:12 -0800
committerRob Landley <rob@landley.net>2018-12-04 17:08:19 -0600
commit141a075c0e192dc9910e777270114b1864270bfd (patch)
tree2d62f0cedc34773310b23b3d8f55f577cbbaf9db /toys/posix/sort.c
parentbcf244f3e6ff3c76536063bc5f7d684c6fd4e3fd (diff)
downloadtoybox-141a075c0e192dc9910e777270114b1864270bfd.tar.gz
Clean up some --help formatting.
Be consistent about upper versus lower case. (Upper seems to have the majority, so I went with that, though I'm happy to provide the opposite patch as long as we're consistent!) Be consistent about using \t. (Though saving a few bytes seems like it might be better done in the code that generates help.h rather than directly in the source, since tabs make careful ASCII art layout hard enough that we regularly have things misaligned.) Remove trailing periods (most of which seem to have been added by me). Always use the US "human readable" rather than my British "human-readable", and be more consistent about declaring whether we're showing multiples of 1000 or 1024. Just say "verbose" rather than adding a useless "mode" or "output".
Diffstat (limited to 'toys/posix/sort.c')
-rw-r--r--toys/posix/sort.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/toys/posix/sort.c b/toys/posix/sort.c
index d4a0f4fd..c33b8ff0 100644
--- a/toys/posix/sort.c
+++ b/toys/posix/sort.c
@@ -17,21 +17,21 @@ config SORT
Sort all lines of text from input files (or stdin) to stdout.
- -r reverse
- -u unique lines only
- -n numeric order (instead of alphabetical)
- -b ignore leading blanks (or trailing blanks in second part of key)
- -c check whether input is sorted
- -d dictionary order (use alphanumeric and whitespace chars only)
- -f force uppercase (case insensitive sort)
- -i ignore nonprinting characters
- -M month sort (jan, feb, etc)
+ -r Reverse
+ -u Unique lines only
+ -n Numeric order (instead of alphabetical)
+ -b Ignore leading blanks (or trailing blanks in second part of key)
+ -c Check whether input is sorted
+ -d Dictionary order (use alphanumeric and whitespace chars only)
+ -f Force uppercase (case insensitive sort)
+ -i Ignore nonprinting characters
+ -M Month sort (jan, feb, etc)
-x Hexadecimal numerical sort
- -s skip fallback sort (only sort with keys)
- -z zero (null) terminated lines
- -k sort by "key" (see below)
- -t use a key separator other than whitespace
- -o output to FILE instead of stdout
+ -s Skip fallback sort (only sort with keys)
+ -z Zero (null) terminated lines
+ -k Sort by "key" (see below)
+ -t Use a key separator other than whitespace
+ -o Output to FILE instead of stdout
Sorting by key looks at a subset of the words on each line. -k2
uses the second word to the end of the line, -k2,2 looks at only
@@ -47,7 +47,7 @@ config SORT_FLOAT
help
usage: sort [-g]
- -g general numeric sort (double precision with nan and inf)
+ -g General numeric sort (double precision with nan and inf)
*/
#define FOR_sort