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: Matthew Woehlke
Subject: Re: tail +n does not work under Linux?
Date: Thu, 07 May 2009 11:15:03 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.21) Gecko/20090320 Fedora/2.0.0.21-1.fc10 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0

Christophe LYON wrote:
I have just noticed that 'tail +n' does not seem to work under Linux.

For instance:
$ tail +3 .cshrc
tail: cannot open `+3' for reading: No such file or directory
==> .cshrc <==
[...]

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).

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.

.... 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::).

--
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
--
"You know what Microsoft's problem really is? They've lost the ability to feel ashamed." -- Pamela Jones (Groklaw)





reply via email to

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