[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: head -n -1
From: |
Paul Eggert |
Subject: |
Re: head -n -1 |
Date: |
Fri, 22 Oct 2004 11:21:39 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
address@hidden (Paul Jarc) writes:
> "tail -n +3" is the one that's different.
Yes, and for symmetry I suppose "head -n +3" could be different too.
However, I'd prefer it if someone would clear this with the POSIX
committee first. The POSIX spec
<http://www.opengroup.org/onlinepubs/009695399/utilities/head.html>
says that -n's option-argument must be a "positive decimal integer",
and one could argue that "+3" is a positive decimal integer and that
"head -n +3" must therefore behave like "head -n 3" does. (This is
what GNU "head" currently does.)
So, basically, the question you'd have to ask is, "Must a conforming
implementation treat 'head -n +3' the same way that it treats 'head -n
3'?". But you'd have to give more justification for the question,
compare "head" to "tail", etc.
You can ask such questions formally here:
http://www.opengroup.org/austin/defectform.html
and you can see recent examples of such questions here, which you
can use for models:
http://www.opengroup.org/austin/mailarchives/ag-review/
If you'd like to draft the question I can help by proofreading it
before you submit it.