[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8231: Bug in the linux command: tail
From: |
Roger N. Clark |
Subject: |
bug#8231: Bug in the linux command: tail |
Date: |
Fri, 11 Mar 2011 16:03:55 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; HP-UX ia64; en-US; rv:1.7.12) Gecko/20051024 |
Eric Blake wrote:
> [re-adding the list, to keep others in the loop]
>
> On 03/11/2011 02:20 PM, Roger N. Clark wrote:
>
>>Eric Blake wrote:
>>
>>
>>>Coreutils 8.10 is the latest release, and the man
>>>page from that version (as well as 'tail --help', from which the man
>>>page is generated) states:
>>>
>>> -n, --lines=K
>>> output the last K lines, instead of the last 10; or use -n
>>> +K to output lines starting with the Kth
>>
>>Eric,
>>So then shouldn't it read something like:
>>
>> -n, -n K, --lines=K
>
>
> No. If anything, you are asking for:
>
> -K, -n K, --lines=K
>
> since you used K as the metavariable, and extension is that you can skip
> the -n and specify just the dash-number. In fact, it would be less
> confusing if we did:
>
> -NUM, -n NUM, --lines=NUM
Eric,
That would be great!
>
> but that wastes valuable 'tail --help' real estate (long lines in --help
> output are hard to justify). We already had that proposal, and didn't
> like how long it made things.
Amazing. There are already longer lines. It seems to me everyone
would want to make things clearer, especially for those new to the
operating system. It's old ideas like the above and below that
gives unix/linux its reputation for being obtuse.
(I've been using unix for 36 years, linux for 10+.)
But we need not beat this to death. Thanks for the responses.
Roger
>
> Besides, we already have the convention that long options that require
> an argument mean that the associated short option also requires an
> option. That is, we are already consistent in writing
>
> -n, --lines=K
>
> as shorthand for:
>
> -n K OR --lines=K
>
> Furthermore, our argument is that -NUM is an _intentionally
> undocumented_ extension - it exists because of older POSIX, but since it
> is not required by current POSIX, so we would rather _only_ document the
> POSIX-preferred spelling of -n <metavariable>, to try and encourage
> people to use only the new form. K was the shortest <metavariable> name
> we could think of that wasn't ambiguous with an option name (the older
> -n, --lines=n used 'n' as both a short option and a metavariable in the
> same line, which is why we switched to K). And listing the '-n +K'
> example in the explanatory text was on purpose, to try and make people
> figure out that '-n' is the literal short option name and that it takes
> an argument related to the metavariable K.
>
>
>>Sorry to be persistent; I would just like the man page to be a little
>>clearer.
>
>
> Suggestions welcome, but know that this has already been debated in the
> past, so good luck coming up with something that still fits within the
> constraints.
>
bug#8231: Bug in the linux command: tail, Alan Curry, 2011/03/11