bug-coreutils
[Top][All Lists]
Advanced

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

Re: error in tail command


From: Bob Proulx
Subject: Re: error in tail command
Date: Wed, 22 Jul 2009 13:47:23 -0600
User-agent: Mutt/1.5.18 (2008-05-17)

mehar koduri wrote:
> we use +n option to output the lines from n to end of line. if it is true
> please update tail manual with +n option. i believe it is right.
> 
> ex: ps h aux | tail +2  (this will output from second line to end of line)

The +N syntax is problematic usage.  You should avoid 'tail +4' usage,
since it might mean either 'tail ./+4' or 'tail -n +4'.  The behavior
depends upon the standards conformance setting used to build the
tool.  Best to avoid the issue entirely.

The problem is that "+" is a valid filename character and is not an
expected option character.  Options are supposed to start with a "-"
character.  It has always been a bad idea to eat up an additional
character as an additional option specifier.  This is now no longer
allowed by the standards.  The tail command is now required to respect
that "+" is not an option and treat it as a filename.

Please read this frequently given answer to this question:

  http://www.gnu.org/software/coreutils/faq/#Old-tail-plus-N-syntax-now-fails

Bob




reply via email to

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