Description of problem: "tail +10" no longer works Version-Release number of selected component (if applicable): coreutils-5.93-4.1 How reproducible: 100% Steps to Reproduce: 1.tail +10 somefile 2. 3. Actual results: tail: cannot open `+10' for reading: No such file or directory. Expected results: all the lines in the file except the first 10 Additional info: Even if someone has taken a dislike to this option, it is still required for backward compatibility as many scripts use it. Also, the option is still described in the man page.
sort is similarly broken.
Here is what the tail man page 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 â+â, print beginning with the Nth item from the start of each file, other- wise, print the last N items in the file. N may have a multiplier suf- fix: b 512, k 1024, m 1024*1024. So for tail, use 'tail -n +10'. If you really must use the old 'tail +10' syntax (which is no longer described in the man page), set _POSIX2_VERSION=199209 in the environment. For more information, see: info coreutils "Standards Conformance" *** This bug has been marked as a duplicate of 174624 ***
Here is what the tail man page 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 â+â, print beginning with the Nth item from the start of each file, other- wise, print the last N items in the file. N may have a multiplier suf- fix: b 512, k 1024, m 1024*1024. $ rpm -qf /usr/share/man/man1/tail.1.gz coreutils-5.93-4.1 Not only that, but "tail --help" says the thing. The problem came up because Sun's JAI installation script fails. Do you really want to break hundreds of scripts by other vendors? Why? Please make _POSIX2_VERSION=199209 the default.
OK, I get it, if you read the man page like a lawyer, and without previous knowledge, it doesn't actually say tail with an unadorned +N is permitted. Given the previous 30year usage of tail I think it might be a little clearer about the change. It should also properly document the environment variable setting for bringing the previous behavior back.
The man page also doesn't describe -N, but "tail -30" works.
REOPENED status has been deprecated. ASSIGNED with keyword of Reopened is preferred.
The man page deliberately omits the description of this non-POSIX option form.