On Sat, 10 Jul 2010 03:50:32 -0700 (PDT) Forest Oakwater
<[email protected]> wrote:

> Using this data file:
> d...@elrond:~/backgrounds/frazetta$ cat data.txt
> line 1
> line 2
> line 3
> line 4
> 
> and this command:
> d...@elrond:~/backgrounds/frazetta$ /usr/bin/tail +2 data.txt
> /usr/bin/tail: cannot open `+2' for reading: No such file or directory
> ==> data.txt <==
> line 1
> line 2
> line 3
> line 4
> 
> Output was incorrect.  The manpage and builtin help text both state:
> 
> d...@elrond:~/backgrounds/frazetta$ /usr/bin/tail --help
> ...
>   -n, --lines=N            output the last N lines, instead of the last
> 10; or use +N to output lines starting with the Nth
> ...

This is not what you did. You did "tail +2", whereas the man says you
should do "tail -n +2", or "tail --lines=+2". If you want to output the
last N lines, rather than starting from the Nth, you'd do "tail -n 2" or
"tail --lines=2".

The "tail +2" syntax is obsolete; probably the recent versions of coreutils
(which 7.4 is not, anyway) dropped support for it.

-- 
D.



Reply via email to