bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tail +N apparent error.


From: Eric Blake
Subject: Re: Tail +N apparent error.
Date: Fri, 09 Oct 2009 06:31:33 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Jan-Pawel Wrozstojnik on 10/9/2009 2:52 AM:
> 
>   -n, --lines=N            output the last N lines, instead of the last
> 10;
>                            or use +N to output lines starting with the
> Nth
> 
> Yet, when I tried:
> 
>         tail +2 FILENAME

Not a bug.  You meant:

tail -n +2 FILENAME.

To make this clearer, the latest version of tail --help outputs this
instead (which means you may want to upgrade; coreutils is now at 8.0):

  -n, --lines=K            output the last K lines, instead of the last 10;
                           or use +K to output lines starting with the Kth

By the way, this is also dependent on what version of POSIX your system
complies with.  Your default is apparently POSIX 2001, but you can select
the older behavior by manipulating the _POSIX2_VERSION environment
variable, as documented in 'info coreutils standards'.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrPLSUACgkQ84KuGfSFAYB9TwCgpla5gwHEe/SYNgUSeh305sL2
UdQAoKR2ovCqW1kODklCaxt66UmNaHeR
=rdKg
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]