Bug#340364: Not a bug

2005-12-01 Thread Thomas Hood
severity 340364 normal
stop

"tail -c 4" is not standards-conformant, so this is not a bug.

Quoting from coreutils NEWS:

  A few usages still have behavior that depends on which POSIX standard is
  being conformed to, and portable applications should beware [of] these
  problematic usages.  These include:

Problematic   Standard-conforming replacement, depending on
   usagewhether you prefer the behavior of:
  POSIX 1003.2-1992POSIX 1003.1-2001
...
tail -c 4 tail -c 10 ./4   tail -c4

I suggest that this be "wontfix"ed.
-- 
Thomas Hood


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#340364: Not a bug

2005-12-01 Thread Vincent Lefevre
On 2005-12-01 16:53:02 +0100, Thomas Hood wrote:
> severity 340364 normal
> stop
> 
> "tail -c 4" is not standards-conformant, so this is not a bug.

It is standard conformant. Please look at

  http://www.opengroup.org/onlinepubs/009695399/utilities/tail.html

There is a space between -c and the number.

-- 
Vincent Lefèvre <[EMAIL PROTECTED]> - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#340364: Not a bug

2005-12-01 Thread Jim Meyering
Vincent Lefevre <[EMAIL PROTECTED]> wrote:

> On 2005-12-01 16:53:02 +0100, Thomas Hood wrote:
>> severity 340364 normal
>> stop
>>
>> "tail -c 4" is not standards-conformant, so this is not a bug.
>
> It is standard conformant. Please look at
>
>   http://www.opengroup.org/onlinepubs/009695399/utilities/tail.html
>
> There is a space between -c and the number.

As you must know, it's fixed upstream on the trunk.
That change will also be in coreutils-5.94.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#340364: Not a bug

2005-12-02 Thread Thomas Hood
Vincent Lefevre wrote:
> On 2005-12-01 16:53:02 +0100, Thomas Hood wrote:
>> severity 340364 normal
>> stop
>> 
>> "tail -c 4" is not standards-conformant, so this is not a bug.
> 
> It is standard conformant. Please look at
> 
>   http://www.opengroup.org/onlinepubs/009695399/utilities/tail.html
> 
> There is a space between -c and the number.


Sorry, I was wrong.  It _is_ standards-conformant.  What I should have said was:
it is ambiguous; different standards prescribe different behavior.  I base
this on the upstream text that I quoted.


Jim Meyering wrote:
> As you must know, it's fixed upstream on the trunk.
> That change will also be in coreutils-5.94.


For the record, can you please clarify this issue?  Was the statement in NEWS
that I quoted earlier incorrect?  What is a correct variant of that statement?

-- 
Thomas Hood


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#340364: Not a bug

2005-12-02 Thread Vincent Lefevre
On 2005-12-02 14:07:45 +0100, Thomas Hood wrote:
> Sorry, I was wrong. It _is_ standards-conformant. What I should have
> said was: it is ambiguous; different standards prescribe different
> behavior. I base this on the upstream text that I quoted.

OK.

> For the record, can you please clarify this issue? Was the statement
> in NEWS that I quoted earlier incorrect? What is a correct variant
> of that statement?

It is incorrect anyway. "tail -c4" doesn't work on Solaris, so that
it is not OK for portable scripts:

craffe:~> echo abcdef | /bin/tail -c4
usage: tail [+/-[n][lbc][f]] [file]
   tail [+/-[n][l][r|f]] [file]
zsh: done   echo abcdef | 
zsh: exit 2 /bin/tail -c4

Here one needs to do:

craffe:~> echo abcdef | /bin/tail -4c
def

Solaris sucks.

-- 
Vincent Lefèvre <[EMAIL PROTECTED]> - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#340364: Not a bug

2006-03-02 Thread Michael Stone
It is incorrect anyway. "tail -c4" doesn't work on Solaris, so that it 
is not OK for portable scripts:


"portable" means "standards compliant", not "will work with any ancient 
syntax ever promulgated by any vendor". To get portable behavior on 
solaris you need to run from /usr/xpg4/bin rather than /usr/bin; I don't 
have a solaris system handy to check but I'd guess that the standard 
syntax would work with /usr/xpg4/bin/tail.


--
Michael Stone


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]