Thanks for pointing that out.
Those are documentation bugs, since the POSIX draft 7 spec
say that those options control how od operates on the concatenation
of the input.

[EMAIL PROTECTED] wrote:
> The built-in help text for od(1) describes the following options:
>
> $ od --help
> Usage: od [OPTION]... [FILE]...
>     ...
>   -j, --skip-bytes=BYTES      skip BYTES input bytes first on each file
>   -N, --read-bytes=BYTES      limit dump to BYTES input bytes per file
>
> This is unambiguous that the effects are *per file*. The man page
> specifies exactly the same behaviour. However, this is not what
> actually happens:
>
> $ od -Ax -tx1z <(echo abc) <(echo xyz)
> 000000 61 62 63 0a 78 79 7a 0a                          >abc.xyz.<
> 000008
>
> $ od -Ax -tx1z -j2 <(echo abc) <(echo xyz)
> 000002 63 0a 78 79 7a 0a                                >c.xyz.<
> 000008
>
> $ od -Ax -tx1z -N2 <(echo abc) <(echo xyz)
> 000000 61 62                                            >ab<
> 000002
>
> $ od -Ax -tx1z -j2 -N2 <(echo abc) <(echo xyz)
> 000002 63 0a                                            >c.<
> 000004
>
> What is the intended behaviour? Should I submit a patch to make the
> code conform to the documentation, or the other way around?
>
> It seems that the documented behavior is more likely to be useful, since
> the current results can easily be achieved with "cat FILE ... | od".
>
>
> -- Ian Bruce  <ian dot bruce at myrealbox dot com>
>
> _______________________________________________
> Bug-textutils mailing list
> [EMAIL PROTECTED]
> http://mail.gnu.org/mailman/listinfo/bug-textutils

_______________________________________________
Bug-textutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-textutils

Reply via email to