diff options
Diffstat (limited to 'coreutils/sort.c')
-rw-r--r-- | coreutils/sort.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/coreutils/sort.c b/coreutils/sort.c index 3562464d1..f709ea1b3 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c | |||
@@ -12,6 +12,54 @@ | |||
12 | * http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html | 12 | * http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html |
13 | */ | 13 | */ |
14 | 14 | ||
15 | //usage:#define sort_trivial_usage | ||
16 | //usage: "[-nru" | ||
17 | //usage: IF_FEATURE_SORT_BIG("gMcszbdfimSTokt] [-o FILE] [-k start[.offset][opts][,end[.offset][opts]] [-t CHAR") | ||
18 | //usage: "] [FILE]..." | ||
19 | //usage:#define sort_full_usage "\n\n" | ||
20 | //usage: "Sort lines of text\n" | ||
21 | //usage: "\nOptions:" | ||
22 | //usage: IF_FEATURE_SORT_BIG( | ||
23 | //usage: "\n -b Ignore leading blanks" | ||
24 | //usage: "\n -c Check whether input is sorted" | ||
25 | //usage: "\n -d Dictionary order (blank or alphanumeric only)" | ||
26 | //usage: "\n -f Ignore case" | ||
27 | //usage: "\n -g General numerical sort" | ||
28 | //usage: "\n -i Ignore unprintable characters" | ||
29 | //usage: "\n -k Sort key" | ||
30 | //usage: "\n -M Sort month" | ||
31 | //usage: ) | ||
32 | //usage: "\n -n Sort numbers" | ||
33 | //usage: IF_FEATURE_SORT_BIG( | ||
34 | //usage: "\n -o Output to file" | ||
35 | //usage: "\n -k Sort by key" | ||
36 | //usage: "\n -t CHAR Key separator" | ||
37 | //usage: ) | ||
38 | //usage: "\n -r Reverse sort order" | ||
39 | //usage: IF_FEATURE_SORT_BIG( | ||
40 | //usage: "\n -s Stable (don't sort ties alphabetically)" | ||
41 | //usage: ) | ||
42 | //usage: "\n -u Suppress duplicate lines" | ||
43 | //usage: IF_FEATURE_SORT_BIG( | ||
44 | //usage: "\n -z Lines are terminated by NUL, not newline" | ||
45 | //usage: "\n -mST Ignored for GNU compatibility") | ||
46 | //usage: | ||
47 | //usage:#define sort_example_usage | ||
48 | //usage: "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" | ||
49 | //usage: "a\n" | ||
50 | //usage: "b\n" | ||
51 | //usage: "c\n" | ||
52 | //usage: "d\n" | ||
53 | //usage: "e\n" | ||
54 | //usage: "f\n" | ||
55 | //usage: IF_FEATURE_SORT_BIG( | ||
56 | //usage: "$ echo -e \"c 3\\nb 2\\nd 2\" | $SORT -k 2,2n -k 1,1r\n" | ||
57 | //usage: "d 2\n" | ||
58 | //usage: "b 2\n" | ||
59 | //usage: "c 3\n" | ||
60 | //usage: ) | ||
61 | //usage: "" | ||
62 | |||
15 | #include "libbb.h" | 63 | #include "libbb.h" |
16 | 64 | ||
17 | /* This is a NOEXEC applet. Be very careful! */ | 65 | /* This is a NOEXEC applet. Be very careful! */ |