-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Igor Rivin on 2/6/2007 6:32 AM: > On my Fedora core 6 system, this fails: > > [EMAIL PROTECTED] tmp]$ tail +2 dog > tail: cannot open `+2' for reading: No such file or directory
This is becoming a FAQ; would anyone care to add it to http://www.gnu.org/software/coreutils/faq/coreutils-faq.html? > [EMAIL PROTECTED] tmp]$ tail --version > tail (GNU coreutils) 5.97 Consider upgrading - the lateset stable version is 6.7. It will not change the behavior of tail in your case, but has other improvements. The short answer is that POSIX is the driving factor here, and that Fedora core 6 has chosen POSIX 1003.1-2001 as their default. Depending on which version of POSIX you are compliant with, tail is specified to treat +3 differently. This is documented in the NEWS for 5.90: A few usages still have behavior that depends on which POSIX standard is being conformed to, and portable applications should beware these problematic usages. These include: Problematic Standard-conforming replacement, depending on usage whether you prefer the behavior of: POSIX 1003.2-1992 POSIX 1003.1-2001 sort +4 sort -k 5 sort ./+4 tail +4 tail -n +4 tail ./+4 tail - f tail f [see (*) below] tail -c 4 tail -c 10 ./4 tail -c4 Also, see 'info coreutils standards' - your choice of _POSIX2_VERSION in the environment chooses which version of POSIX you want tail to comply to. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFyI3a84KuGfSFAYARAhp9AJ9gp9i0BqJlp9FvlFLzO0OO+Kk6MACeOKEw nrQBf8ycI66wJgSnPEhbiwk= =9YBj -----END PGP SIGNATURE----- _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
