>> Note that the +N notation is specific to --lines=, not the '-n'
>> shorthand.
>
> Wrong - the +N notation also works with -n:
>
> ps -a | tail -n +5
Ah, I was confused since 'tail -5' still works, but:
> This is a side affect of the change to the newer POSIX standard.
>
> http://www.gnu.org/
This is a side affect of the change to the newer POSIX standard. For instance,
to use the old standard:
503:$ _POSIX2_VERSION=199209
504:$ export _POSIX2_VERSION
505:$ ps -a | tail +5
2864 12864 2864 con 718399 19:26:01 /usr/bin/rxvt
76122864
According to Chris Sutcliffe on 3/2/2010 8:01 PM:
>> The "tail +4" commands does not work as advertised. When given such command
>> (advertised in man command), it complains it can't open the file. With the
>> command "tail +5 -", it produces the desired output with some junk on
>> standard outpu
> The "tail +4" commands does not work as advertised. When given such command
> (advertised in man command), it complains it can't open the file. With the
> command "tail +5 -", it produces the desired output with some junk on
> standard output.
As per the tail manpage:
-n, --lines=N
The "tail +4" commands does not work as advertised. When given such
command (advertised in man command), it complains it can't open the
file. With the command "tail +5 -", it produces the desired output with
some junk on standard output.
See examples:
$ ps -a | tail +5 -
tail: cannot open `
5 matches
Mail list logo