summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/uniq.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/uniq.c b/src/uniq.c
index c61468c26..b3b16ffb3 100644
--- a/src/uniq.c
+++ b/src/uniq.c
@@ -443,7 +443,13 @@ main (int argc, char **argv)
&& optarg[0] == '+'
&& xstrtoul (optarg, NULL, 10, &size, "") == LONGINT_OK
&& size <= SIZE_MAX)
- skip_chars = size;
+ {
+ if (! posixly_correct)
+ error (0, 0,
+ _("warning: `uniq %s' is obsolete; use `uniq -s %s' instead"),
+ optarg, optarg + 1);
+ skip_chars = size;
+ }
else if (nfiles == 2)
{
error (0, 0, _("extra operand `%s'"), optarg);