summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2014-01-31 17:39:52 +0100
committerPádraig Brady <P@draigBrady.com>2014-02-09 11:29:24 +0000
commitb370924c03adaef222859061c61be06fc30c9a3e (patch)
tree026d54633dc52ac9c7339b2c953f5cfeceaa7426 /doc
parentb938b6e289ef78815935ffa705673a6a8b2ee98e (diff)
downloadcoreutils-b370924c03adaef222859061c61be06fc30c9a3e.tar.xz
od: add an --endian option to control byte swapping
* src/od.c (main): Handle the new --endian option, taking "little" and "big" as parameters. (usage): Describe the new option. (PRINT_FIELDS): Adjust to swap bytes if required. * tests/misc/od-endian.sh: A new test to verify the byte swapping operations for hex (ints) and floats for all sizes between 1 and 16 inclusive. * test/local.mk: Reference the new test. * doc/coreutils.texi (od invocation): Describe the new option. * NEWS: Mention the new feature.
Diffstat (limited to 'doc')
-rw-r--r--doc/coreutils.texi10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 35e7bd9fd..326929125 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -1868,6 +1868,16 @@ none (do not print offsets).
The default is octal.
+@item --endian=@var{order}
+@opindex --endian
+@cindex byte-swapping
+@cindex endianness
+Reorder input bytes, to handle inputs with differing byte orders,
+or to provide consistent output independent of the endian convention
+of the current system. Swapping is performed according to the
+specified @option{--type} size and endian @var{order}, which can be
+@samp{little} or @samp{big}.
+
@item -j @var{bytes}
@itemx --skip-bytes=@var{bytes}
@opindex -j