coreutils
[Top][All Lists]
Advanced

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

Re: Some question regarding tail and option "-c"


From: Jim Meyering
Subject: Re: Some question regarding tail and option "-c"
Date: Tue, 09 Oct 2012 08:50:39 +0200

Philipp Thomas wrote:

> * Jim Meyering (address@hidden) [20121003 20:09]:
>
>> I can reproduce that by specifying an older version of POSIX:
>>
>>     $ : | _POSIX2_VERSION=0 tail -c 10
>>     tail: cannot open '10' for reading: No such file or directory
>
> But AFAICS both 1003.2-1992 and 1003.2-2001 define the syntax as being »-c
> number« i.e, with a blank between -c and the number but for 1003.2-1992 tail
> only accepts -c<number> .  With POSIX2_VERSION=199209 tail accepts »-n 10«,
> so why doesn't -c accept a blank between option and number?

The behavior of "tail -c N" changed between those two years (1992,2001),
yet the -n option was not recognized in the 1992 version, so it is treated
consistently regardless of _POSIX2_VERSION.  Fortunately for users (less
so for you with your question, and for me taking time to answer it),
-n is not consistent with the obsolescent rules that determine how tail
treats -c and -l.



reply via email to

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