bug-textutils
[Top][All Lists]
Advanced

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

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


From: ian . bruce . nospam
Subject: documented versus actual behaviour of od(1) with multiple input files
Date: Sat, 18 Aug 2001 12:07:00 -0700

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>



reply via email to

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