Bug 174624 - "tail +5 file" no longer works
Summary: "tail +5 file" no longer works
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
: 174785 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-11-30 19:52 UTC by Ville Herva
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-11-30 19:58:30 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ville Herva 2005-11-30 19:52:12 UTC
Description of problem:
tail +<number> file no longer works

Version-Release number of selected component (if applicable):
coreutils-5.93-4
tail (GNU coreutils) 5.93

How reproducible:
always

Steps to Reproduce:
1. tail +5 /etc/protocols
2.
3.
  
Actual results:
tail: cannot open `+5' for reading: No such file or directory
==> /etc/protocols <==
crdup   127     CRUDP           # Combat Radio User Datagram
sscopmce        128     SSCOPMCE
(...)

Expected results:
lines beginning from line 5


Additional info:
One can use 

  tail -n +5 /file

as a workaround.

However, this ("tail +5" not working) breaks many existing scripts, such as the 
Sun j2re-1.4.2 installer. "tail +2" appears to work on other platforms as well 
(like Irix). 

At least coreutils-5.93-2 broken as well,
but tail from coreutils-5.2.1-56 works.

Comment 1 Tim Waugh 2005-11-30 19:58:30 UTC
This is intentional.  See this info page:

info coreutils "Standards Conformance"

for rationale and a work-around that will work in the case you mention.

Comment 2 Ville Herva 2005-11-30 20:05:28 UTC
Umh,
http://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=tail&submit=Search%21&
idxname=bug-coreutils&max=20&result=normal&sort=score

seems to clarify this issue.

I'm not sure if people _really_ need to be able to tail files with a name like "
+72" easier than to view the lines starting from 72 of any file.

But I guess POSIX is the word of God. And the scripts will be fixed in twenty 
years anyway...



Comment 3 Ville Herva 2005-11-30 20:14:05 UTC
Thanks for the quick reply.

(As an afterthought I realize my tone was not perhaps as calm as it should've 
been. In any case I didn't mean to blame _you_.)


Comment 4 Tim Waugh 2005-12-02 09:26:07 UTC
*** Bug 174785 has been marked as a duplicate of this bug. ***

Comment 5 Tim Waugh 2005-12-16 09:50:17 UTC
*** Bug 175907 has been marked as a duplicate of this bug. ***


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