[git commit] shuf: tweak --help text

Denys Vlasenko vda.linux at googlemail.com
Mon Aug 23 13:48:22 UTC 2021


commit: https://git.busybox.net/busybox/commit/?id=d59f539d577ebf6100f1292e27560514e8a18195
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 coreutils/shuf.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/coreutils/shuf.c b/coreutils/shuf.c
index 3b2ba93cf..4b41d5e71 100644
--- a/coreutils/shuf.c
+++ b/coreutils/shuf.c
@@ -17,14 +17,14 @@
 //kbuild:lib-$(CONFIG_SHUF) += shuf.o
 
 //usage:#define shuf_trivial_usage
-//usage:       "[-e|-i L-H] [-n NUM] [-o FILE] [-z] [FILE|ARG...]"
+//usage:       "[-n NUM] [-o FILE] [-z] [FILE | -e [ARG...] | -i L-H]"
 //usage:#define shuf_full_usage "\n\n"
 //usage:       "Randomly permute lines\n"
-//usage:     "\n	-e	Treat ARGs as lines"
-//usage:     "\n	-i L-H	Treat numbers L-H as lines"
 //usage:     "\n	-n NUM	Output at most NUM lines"
 //usage:     "\n	-o FILE	Write to FILE, not standard output"
 //usage:     "\n	-z	NUL terminated output"
+//usage:     "\n	-e	Treat ARGs as lines"
+//usage:     "\n	-i L-H	Treat numbers L-H as lines"
 
 #include "libbb.h"
 
@@ -50,7 +50,7 @@ static void shuffle_lines(char **lines, unsigned numlines, unsigned outlines)
 
 	srand(monotonic_us());
 
-	for (i = numlines-1; outlines > 0; i--, outlines--) {
+	for (i = numlines - 1; outlines > 0; i--, outlines--) {
 		r = rand();
 		/* RAND_MAX can be as small as 32767 */
 		if (i > RAND_MAX)


More information about the busybox-cvs mailing list