bug-textutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: Bug#80541: [Patch] GNU tail does now support option


From: Jim Meyering
Subject: Re: address@hidden: Bug#80541: [Patch] GNU tail does now support option -F/--follow-forever]
Date: Wed, 12 Sep 2001 09:35:31 +0200
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.106

Herbert Xu <address@hidden> wrote:

> On Tue, May 08, 2001 at 05:30:05PM +0200, Jim Meyering wrote:
> > Herbert Xu <address@hidden> wrote:
>>
>> | Full details are available at
>> |    http://bugs.debian.org/80541
>> |
>> | In that thread, Christian Kurz also noted that FreeBSD's tail already
>> | supports a -F option whose behaviour is almost identical to this proposed
>> | option.  The same is true in NetBSD.

Thanks.  I've made this change:

        tail: accept new option: -F, equivalent to `--follow=name --retry',
        for compatibility with FreeBSD and NetBSD versions of tail.

        * src/tail.c (usage): Describe new option.
        (parse_options): Accept it.
        Patch by Christian Kurz, via Herbert Xu.

Index: tail.c
===================================================================
RCS file: /fetish/textutils/src/tail.c,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -p -u -r1.152 -r1.153
--- tail.c      2001/07/08 21:29:09     1.152
+++ tail.c      2001/09/12 07:27:29     1.153
@@ -250,6 +250,7 @@ With no FILE, or when FILE is -, read st
                            output appended data as the file grows;\n\
                            -f, --follow, and --follow=descriptor are\n\
                            equivalent\n\
+  -F                       same as --follow=name --retry\n\
   -n, --lines=N            output the last N lines, instead of the last %d\n\
       --max-unchanged-stats=N\n\
                            with --follow=name, reopen a FILE which has not\n\
@@ -1365,13 +1366,18 @@ parse_options (int argc, char **argv,
   count_lines = 1;
   forever = from_start = print_headers = 0;
 
-  while ((c = getopt_long (argc, argv, "c:n:fqs:v", long_options, NULL))
+  while ((c = getopt_long (argc, argv, "c:n:fFqs:v", long_options, NULL))
         != -1)
     {
       switch (c)
        {
        case 0:
          break;
+
+       case 'F':
+         forever = 1;
+         follow_mode = Follow_name;
+         reopen_inaccessible_files = 1;
 
        case 'c':
        case 'n':



reply via email to

[Prev in Thread] Current Thread [Next in Thread]