bug-coreutils
[Top][All Lists]
Advanced

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

Re: tail +n does not work under Linux?


From: Christophe LYON
Subject: Re: tail +n does not work under Linux?
Date: Thu, 07 May 2009 18:57:02 +0200
User-agent: Thunderbird 2.0.0.21 (X11/20090302)


I am using coreutils-7.2, and I have just reproduced the issue with 7.3, under Linux RHEL 3 and 4.

Also with Fedora 10's 6.12 package. The behavior change I think may have been in 6.0 (it is probably in the changelog).


I do remember that change, but I also thought that it had been reverted a few releases later.

Curiously, it works OK under Solaris 8.
Are you talking about GNU coreutils here, or the Solaris tail? If the behavior is different for GNU coreutils, that is probably a bug.

Yes, GNU coreutils built under Solaris.

.... and tail -3 works.
Have I misunderstood the doc
Yes.

or is it a bug?
No, it is intended behavior.

 From 'info tail':

   For compatibility `tail' also supports an obsolete usage `tail
-[COUNT][bcl][f] [FILE]', which is recognized only if it does not
conflict with the usage described above.  This obsolete form uses
exactly one option and at most one file.  In the option, COUNT is an
optional decimal number optionally followed by a size letter (`b', `c',
`l') to mean count by 512-byte blocks, bytes, or lines, optionally
followed by `f' which has the same meaning as `-f'.

   On older systems, the leading `-' can be replaced by `+' in the
obsolete option syntax with the same meaning as in counts, and obsolete
usage overrides normal usage when the two conflict.  This obsolete
behavior can be enabled or disabled with the `_POSIX2_VERSION'
environment variable (*note Standards conformance::).


But 'man tail' says:
       -n, --lines=N
output the last N lines, instead of the last 10; or use +N to
              output lines starting with the Nth

does it mean that '-n' is mandatory before a number? I interpreted it as '-number'.

Christophe.




reply via email to

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