bug-textutils
[Top][All Lists]
Advanced

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

Re: documented versus actual behaviour of od(1) with multiple input file


From: Jim Meyering
Subject: Re: documented versus actual behaviour of od(1) with multiple input files
Date: Mon, 20 Aug 2001 09:21:50 +0200
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.105

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.

address@hidden 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
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-textutils



reply via email to

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