Red Hat Bugzilla – Full Text Bug Listing
|Summary:||tail does not work when using + sign instead of - for number of lines|
|Product:||[Fedora] Fedora||Reporter:||John F <johnhford>|
|Component:||coreutils||Assignee:||Ondrej Vasik <ovasik>|
|Status:||CLOSED NOTABUG||QA Contact:||Fedora Extras Quality Assurance <extras-qa>|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2008-04-03 14:18:04 EDT||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
Description John F 2008-04-03 12:10:45 EDT
tail (GNU coreutils) 6.9 coreutils-6.9-17.fc8 uname -a: Linux dv2727ca 188.8.131.52-50.fc8 #1 SMP Thu Mar 20 14:47:10 EDT 2008 i686 i686 i386 GNU/Linux How reproducible: Steps to Reproduce: 1. Run "cat /etc/passwd | head -3 | tail +2" -tail: cannot open `+2' for reading: No such file or directory 2. Run "cat /etc/passwd | tail +3 | head -2" -tail: cannot open `+3' for reading: No such file or directory Actual results: The error messages above Expected results: Tail to pass the last two lines of the first three in the first example, and tail to pass the first three lines to head in the second example. these commands work on all other systems i have tested it on. None of them are fedora systems. Additional info: It seems that tail doesn't like +2 on fedora but works on Ubuntu, SuSE and all other linux systems i try it on.
Comment 1 Ondrej Vasik 2008-04-03 14:18:04 EDT
Thanks for report, but it's not a bug. If Ubuntu, SUSE and other linux systems works, it does mean that they have VERY old coreutils package(behaviour changed in 2005) or they made fork from upstream in this case. Both is bad idea, as the current way how Fedora coreutils handles this command conforms to the latest POSIX and upstream. There is easy workaround to make tail working with "obsolete syntax" ... Simply add alias tail="_POSIX2_VERSION=199209 tail" to .bashrc (or to other file at system level which accepts aliases). You could read more in https://bugzilla.redhat.com/show_bug.cgi?id=287751 RHEL-5 bugzilla about that issue. Closing NOTABUG.