1303 files changed, 32187 insertions, 57138 deletions
diff --git a/coreutils/uniq.c b/coreutils/uniq.c index 9208d34..be550b5 100644 --- a/coreutils/uniq.c +++ b/coreutils/uniq.c @@ -6,6 +6,15 @@ * * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ +//config:config UNIQ +//config: bool "uniq" +//config: default y +//config: help +//config: uniq is used to remove duplicate lines from a sorted file. + +//applet:IF_UNIQ(APPLET(uniq, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_UNIQ) += uniq.o /* BB_AUDIT SUSv3 compliant */ /* http://www.opengroup.org/onlinepubs/007904975/utilities/uniq.html */ @@ -50,8 +59,7 @@ int uniq_main(int argc UNUSED_PARAM, char **argv) skip_fields = skip_chars = 0; max_chars = INT_MAX; - opt_complementary = "f+:s+:w+"; - opt = getopt32(argv, "cduf:s:w:", &skip_fields, &skip_chars, &max_chars); + opt = getopt32(argv, "cduf:+s:+w:+", &skip_fields, &skip_chars, &max_chars); argv += optind; input_filename = argv[0]; @@ -112,7 +120,7 @@ int uniq_main(int argc UNUSED_PARAM, char **argv) /* %7lu matches GNU coreutils 6.9 */ printf("%7lu ", dups + 1); } - printf("%s\n", old_line); + puts(old_line); } free(old_line); } |