Bug 174785 - Tail does not understand "+2" as an option
Tail does not understand "+2" as an option
Status: CLOSED DUPLICATE of bug 174624
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
5
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-01 23:36 EST by Anthony Thyssen
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-12-02 04:26:04 EST
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 Anthony Thyssen 2005-12-01 23:36:47 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051118 Fedora/1.5-0.5.0.rc3 Firefox/1.5

Description of problem:
The use of a command such as
    tail +2  file
has been a standard part of UNIX from before I graduated (1988!)
This is the first time I have ever see the above option report...
    tail: cannot open `+2' for reading: No such file or directory

This is not good, I know of hundreds, if not thousands of UNXI shells scripts that rely on tail +2 printing a file from the second line onward.

EG: from the FC5 manual...
   If the first character of N (the number of bytes or lines)  is  a  ‘+’,
       print  beginning  with the Nth item from the start of each file

This includes the use  of just + instead of -+2  which also failes to work!


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

How reproducible:
Always

Steps to Reproduce:
1.  tail +2 .xsession-errors
2.
3.
  

Actual Results:      tail: cannot open `+2' for reading: No such file or directory
followed by a filename header, and the last ten lines of the file!

Expected Results:  no header (only one filename given.
all the lines of the file except the first (eg line N onward)


Additional info:

The use of +N as a option for tail has been present since the 1970's!
It must be provided for compatability.

This could cause sever problems as it impairs the working of existing shell scripts.
Comment 1 Tim Waugh 2005-12-02 04:26:04 EST
Use 'tail -n +2'.

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

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