|Anonymous | Login||2021-12-02 13:08 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details|
|ID||Category||Severity||Type||Date Submitted||Last Update|
|0001017||[1003.1(2013)/Issue7+TC1] Shell and Utilities||Objection||Clarification Requested||2016-01-04 15:59||2019-10-21 13:56|
|Organization||The Open Group|
|Final Accepted Text|
|Summary||0001017: od -A n and final offset|
The extended description for od has a paragraph about writing the
byte offsets, which begins "Unless -A n is specified, ..." and ends
with the sentence "In addition, the offset of the byte following the
last byte written shall be written after all the input data has been
processed, but shall not be followed by any <blank> characters."
It is not clear whether or not this last sentence is covered by
the "Unless" clause at the beginning of the paragraph. If it is
not covered, then with -A n the line which would have contained that
final offset should still be written, but without the actual offset
(i.e. an empty line); if it is covered, then the line should not be
written at all. Some implementations write an empty line and some don't.
Although it seems pointless to write the empty line, it is what all
certified UNIX systems do, so I would prefer that the standard is
clarified to explicitly allow both behaviours.
Add a new sentence to the end of the paragraph:
If -A n is specified, it is unspecified whether the line that would contain this final offset is written as an empty line or is not written.
It seems that the word "unless" does not make sense in the whole following text-
The way I read the text, the final address always needs to be written.
Do you know of a POSIX certified od implementation that does not print the final address line?
I agree with Joerg. The final value represents a separate report of the relative number of bytes processed for that invocation, not the start value for a particular block that -A n applies to. For a single file that value minus any specified start offset is the actual count. The -A description doesn't refer to it also being excluded, anyways, and should if that is the intent. It reads more as a non-optional output line as things are, by the 'shall be written' assertion.
In terms of formatting it should be explicitly followed by a newline too, imo, so the output of the run is a full line not just reported without alignment blanks as is stated, and if -A o, d, or x is specified that overrides the default base used when the -A missing, or -A n option is present, for the report. This is implied by the examples, but appears normatively ambiguous.
|Nobody writes the final offset when -A n is used. Existing behaviour is either to write an empty line there (i.e. the final offset line without the actual offset) or nothing at all.|
I know of no certified implementation that omits the final address line.
Does somebody know such an implementation?
|2016-01-04 15:59||geoffclare||New Issue|
|2016-01-04 15:59||geoffclare||Name||=> Geoff Clare|
|2016-01-04 15:59||geoffclare||Organization||=> The Open Group|
|2016-01-04 15:59||geoffclare||Section||=> od|
|2016-01-04 15:59||geoffclare||Page Number||=> 3012|
|2016-01-04 15:59||geoffclare||Line Number||=> 99876-99881|
|2016-01-04 15:59||geoffclare||Interp Status||=> ---|
|2016-01-04 16:36||joerg||Note Added: 0002994|
|2016-01-04 19:19||shware_systems||Note Added: 0002995|
|2016-01-05 09:09||geoffclare||Note Added: 0002996|
|2016-01-06 15:23||joerg||Note Added: 0003011|
|2016-10-27 15:42||Don Cragun||Status||New => Resolved|
|2016-10-27 15:42||Don Cragun||Resolution||Open => Accepted|
|2016-10-27 15:42||Don Cragun||Tag Attached: tc3-2008|
|2019-10-21 13:56||geoffclare||Status||Resolved => Applied|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|