diff options
Diffstat (limited to 'src/tail.c')
-rw-r--r-- | src/tail.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tail.c b/src/tail.c index d00a89d6d..2131c1d4b 100644 --- a/src/tail.c +++ b/src/tail.c @@ -1381,10 +1381,10 @@ parse_obsolescent_option (int argc, const char *const *argv, if (!*fail) { + bool posix_pedantic = (getenv ("POSIXLY_CORRECT") != NULL); + if (argc > 3) { - int posix_pedantic = (getenv ("POSIXLY_CORRECT") != NULL); - /* When POSIXLY_CORRECT is set, enforce the `at most one file argument' requirement. */ if (posix_pedantic) @@ -1405,6 +1405,11 @@ option instead."), argv[1]); #endif } + if (! posix_pedantic) + error (0, 0, + _("warning: `tail %s' is obsolete; use -n or -c instead"), + argv[1]); + /* Set globals. */ from_start = t_from_start; count_lines = t_count_lines; |