Bug 173431
Summary: | tail +N syntax broken / missing | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jason Vas Dias <jvdias> |
Component: | coreutils | Assignee: | Tim Waugh <twaugh> |
Status: | CLOSED NOTABUG | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | rawhide | CC: | ehringer.eike, sergeyfd, zaitcev |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-11-17 09:10:51 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jason Vas Dias
2005-11-17 02:16:17 UTC
The correct syntax for this is "tail -n +2 f". You can get the old syntax (which does not conform to the current POSIX spec) back like this: export _POSIX2_VERSION=199209 seq 1 3 > f tail +2 f See the info page aobut this: info coreutils "Standards Conformance" *** Bug 203535 has been marked as a duplicate of this bug. *** Hi, but then i´am wondering - when the old syntax does not conform the current POSIX spec, why the MAN pages says: 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, otherwise, print the last N items in the file. Would it be possible to get a package with the functionallilty - like the MAN pages saing? Ehringer: you are mis-interpreting the man page. Here is what it actually says: -n, --lines=N output the last N lines, instead of the last 10 ... If the first character of N (the number of bytes or lines) is a â+â, ... In other words, the N here is the one from --lines=N. The case described is for --lines=+1 (for example). The '-n, --lines=N' syntax is the common way of describing that there is a short option (-n) and a long option (--lines), both of which take an argument N. So this is a short way of saying '-n N, --lines=N'. *** Bug 203537 has been marked as a duplicate of this bug. *** Ok thanks! Sorry for misunderstood... # bye eike *** Bug 217174 has been marked as a duplicate of this bug. *** *** Bug 229151 has been marked as a duplicate of this bug. *** |