Bug 458827 - tail command under 5.2 cannot handle + option
Summary: tail command under 5.2 cannot handle + option
Keywords:
Status: CLOSED DUPLICATE of bug 287751
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: coreutils
Version: 5.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Ondrej Vasik
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-08-12 15:19 UTC by jas
Modified: 2008-08-13 08:06 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-08-13 08:06:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description jas 2008-08-12 15:19:08 UTC
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 08:06:06 UTC
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.