[Top][All Lists]

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

bug#6605: +N lines broken with /usr/bin/tail (GNU coreutils) 7.4

From: Davide Brini
Subject: bug#6605: +N lines broken with /usr/bin/tail (GNU coreutils) 7.4
Date: Thu, 15 Jul 2010 22:28:53 +0100

On Thu, 15 Jul 2010 13:34:50 -0700 (PDT) Forest Oakwater
<address@hidden> 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.


reply via email to

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