[prev in list] [next in list] [prev in thread] [next in thread] 

List:       coreutils-bug
Subject:    bug#6605: +N lines broken with /usr/bin/tail (GNU coreutils) 7.4
From:       Davide Brini <dave_br () gmx ! com>
Date:       2010-07-15 21:28:53
Message-ID: 20100715222853.7be64f73 () scooter ! pippo ! db
[Download RAW message or body]

On Thu, 15 Jul 2010 13:34:50 -0700 (PDT) Forest Oakwater
<forest_oakwater@yahoo.com> wrote:

> Paul,
> 
> Thank you for the information.  Would you consider updating the builtin
> documentation and man page to match the behavior of the program?

It *is* correct. Nowhere it says that you can use "tail -2" or "tail +2".

Instead it says that you should use

"tail -n N", or "tail --lines=N" (or +N if you want from line N).

> Also, do you know of an efficient POSIX way to filter out the first N
> lines of a text file?
> 
> # inefficient?
> head -N datafile > datafile.head
> diff datafile.head datafile |grep '^>' |cut -c3- > datafile.new
> mv datafile.new datafile

Dozens, all probably just as efficient as using tail -n +N.

-- 
D.




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic