summaryrefslogtreecommitdiff
path: root/usage.h
diff options
context:
space:
mode:
authorMark Whitley2001-04-17 18:56:18 +0000
committerMark Whitley2001-04-17 18:56:18 +0000
commitfccaa3629b89bcfcd2d9b4126255cd31e0f5e174 (patch)
tree1384fdafb928c700cba166f7e3609b516d5b7287 /usage.h
parent6e808ca35419ba7ec14dd836f0e013ea35ff0aee (diff)
downloadbusybox-fccaa3629b89bcfcd2d9b4126255cd31e0f5e174.zip
busybox-fccaa3629b89bcfcd2d9b4126255cd31e0f5e174.tar.gz
Applied patch from I.Q. to add sort -u as a feature.
Diffstat (limited to 'usage.h')
-rw-r--r--usage.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/usage.h b/usage.h
index f375dfd..1e3023d 100644
--- a/usage.h
+++ b/usage.h
@@ -1356,15 +1356,24 @@
"[2 second delay results]\n"
+#ifdef BB_FEATURE_SORT_UNIQUE
+ #define USAGE_SORT_UNIQUE(a) a
+#else
+ #define USAGE_SORT_UNIQUE(a)
+#endif
#ifdef BB_FEATURE_SORT_REVERSE
#define USAGE_SORT_REVERSE(a) a
#else
#define USAGE_SORT_REVERSE(a)
#endif
#define sort_trivial_usage \
- "[-n]" USAGE_SORT_REVERSE(" [-r]") " [FILE]..."
+ "[-n" USAGE_SORT_REVERSE("r") USAGE_SORT_UNIQUE("u") "] [FILE]..."
#define sort_full_usage \
- "Sorts lines of text in the specified files"
+ "Sorts lines of text in the specified files\n\n"\
+ "Options:\n" \
+ USAGE_SORT_UNIQUE("\t-u\tsuppress duplicate lines\n") \
+ USAGE_SORT_REVERSE("\t-r\tsort in reverse order\n") \
+ "\t-n\tsort numerics"
#define sort_example_usage \
"$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \
"a\n" \