Bug 458827 - tail command under 5.2 cannot handle + option
tail command under 5.2 cannot handle + option
Status: CLOSED DUPLICATE of bug 287751
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: coreutils (Show other bugs)
5.2
All Linux
medium Severity medium
: rc
: ---
Assigned To: Ondrej Vasik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-12 11:19 EDT by jas
Modified: 2008-08-13 04:06 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-08-13 04:06:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description jas 2008-08-12 11:19:08 EDT
Description of problem:

Under Redhat Enterprise 4.X, the tail command would accept the "+numlines" argument.  On 5.2, it does not. 


Version-Release number of selected component (if applicable):

tail under 4.6 is based on coreutils 5.2.1
tail under 5.2 is based on coreutils 5.97

How reproducible:

tail +2

Actual results:

tail: cannot open `+2' for reading: No such file or directory

Expected results:

lines 2+ of file 

Note: tail -n +2 works, but "tail -2" still works (to give the last 2 lines of the file)... either tail should enforce the fact that -n needs to always be used, and hence "-2" shouldn't work, or if -2 works without -n, +2 should work as well.
Comment 1 Ondrej Vasik 2008-08-13 04:06:06 EDT
Thanks for report. It is not a bug and it was already reported few times. This behaviour is required by latest version of POSIX - which is used by coreutils-5.97 (used by RHEL-5) and later. This is documented in NEWS and coreutils info documentation. As it was reported few times, I agreed to add the description of the behaviour to tail manpages in RHEL 5.3 update. Marking that bug DUPLICATE of #287751 , see that bugzilla for possible workarounds (changing _POSIX2_VERSION to 199209 will make tail working as in RHEL-4).

*** This bug has been marked as a duplicate of bug 287751 ***

Note You need to log in before you can comment on or make changes to this bug.