[git commit] uniq: really support -z

Denys Vlasenko vda.linux at googlemail.com
Thu Jun 24 21:37:06 UTC 2021


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

Commit 894466cc5 (uniq: support -z) added support for NUL delimited
output.  Unfortunately nobody told getopt32().

Signed-off-by: Ron Yorston <rmy at pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 coreutils/uniq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/coreutils/uniq.c b/coreutils/uniq.c
index ef50981ed..a3058ac07 100644
--- a/coreutils/uniq.c
+++ b/coreutils/uniq.c
@@ -64,7 +64,7 @@ int uniq_main(int argc UNUSED_PARAM, char **argv)
 	skip_fields = skip_chars = 0;
 	max_chars = INT_MAX;
 
-	opt = getopt32(argv, "cduf:+s:+w:+i", &skip_fields, &skip_chars, &max_chars);
+	opt = getopt32(argv, "cduf:+s:+w:+iz", &skip_fields, &skip_chars, &max_chars);
 	argv += optind;
 
 	input_filename = argv[0];


More information about the busybox-cvs mailing list