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)
_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils