On Thu, 15 Jul 2010 13:34:50 -0700 (PDT) Forest Oakwater
<[email protected]> 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.



Reply via email to