I may have found a bug in tail. The -f option fails to "follow" a file when used with a line count.
Examples: [EMAIL PROTECTED] src]# cat EXAMPLES Script started on Wed 09 Nov 2005 01:09:10 PM EST [EMAIL PROTECTED] src]# ./tail --version tail (GNU coreutils) 5.93 Copyright (C) 2005 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law. Written by Paul Rubin, David MacKenzie, Ian Lance Taylor, and Jim Meyering. [EMAIL PROTECTED] src]# ./tail -4 /etc/passwd #WORKS FINE colin:x:503:503::/home/colin:/bin/bash patrick:x:504:504::/home/patrick:/bin/bash judy:x:505:505::/home/judy:/bin/bash joy:x:506:506::/home/joy:/bin/bash [EMAIL PROTECTED] src]# ./tail -f /etc/passwd # WORKS FINE tomcat:x:53:53:Tomcat server:/var/lib/tomcat:/sbin/nologin cyrus:x:76:12:Cyrus IMAP Server:/var/lib/imap:/bin/bash exim:x:93:93::/var/spool/exim:/sbin/nologin jkinz:x:500:500::/home/jkinz:/bin/bash steve:x:501:501::/home/steve:/bin/bash fred:x:502:502::/home/fred:/bin/bash colin:x:503:503::/home/colin:/bin/bash patrick:x:504:504::/home/patrick:/bin/bash judy:x:505:505::/home/judy:/bin/bash joy:x:506:506::/home/joy:/bin/bash #BUT if you combine the two: [EMAIL PROTECTED] src]# ./tail -4 -f /etc/passwd ./tail: invalid option -- 4 Try `./tail --help' for more information. Its possible that I'm missing something here but I am able to produce a slightly different bug on version 5.2.1 of tail as well: ################################################# [EMAIL PROTECTED] root]# tail --version tail (coreutils) 5.2.1 Written by Paul Rubin, David MacKenzie, Ian Lance Taylor, and Jim Meyering. Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [EMAIL PROTECTED] root]# tail -4 -f /etc/passwd tail: cannot open `-f' for reading: No such file or directory ==> /etc/passwd <== colin:x:503:503::/home/colin:/bin/bash patrick:x:504:504::/home/patrick:/bin/bash judy:x:505:505::/home/judy:/bin/bash joy:x:506:506::/home/joy:/bin/bash [EMAIL PROTECTED] root]# ################################################### The man page says nothing about this and the only thing the info page says is that the "-4" type argument must be the first option. So - is this a bug? -- Jeff Kinz, Emergent Research, Hudson, MA. speech recognition software may have been used to create this e-mail -- Jeff Kinz, Emergent Research, Hudson, MA. speech recognition software may have been used to create this e-mail _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
