Manual Reference Pages  - mdump (1)

NAME

mdump - dump data from a binary file.

CONTENTS

Synopsis
Description
Options
Examples
See Also
License
Copyright
Authors

SYNOPSIS

mdump [ -h -? -help --help --? ]
mdump [options...]

DESCRIPTION

mdump reads data from a specified input file or stdin and dumps data elements from it to a specified output file or stdout after formatting them as indicated. mdump may be either used as a replacement for od or to extract data from simple binary files without having to write a specialized program.

mdump may be obtained from:

Use of mdump is subject to the License terms.

OPTIONS

-blocks blocks
  The number of data blocks to emit. 0 = all = default.
-dtype data_type
  Set the type of the data elements:
    c char
    s short int
    l (long) int default
    g long long not available on all platforms
    f float
    d double
-ds
  Emit data sizes and exit.
-flip
  Invert byte order. Default is to leave byte order as is.
-format format_string
  A C printf format string which controls the formatting of data elements. A C format string contains: ' %width.precisionSpecifier'. The C format specifiers are: c (character), o (octal), x (hexadecimal), d (decimal), ll[d,u,o,x] long long variants, f (floating point), e (exponent). The valid format specifiers for each type are:
 c c,d,o,x     default: ' %c'
 s d,o,x       default: ' %9d'
 l d,o,x       default: ' %9d'
 g ll[u,d,o,x] default: ' %18llu'
 f f,e         default: ' %9e'
 d f,e         default: ' %9e'
-h -help --help -? --??
  Print the help message and exit.
-i
  Emit version, copyright, license and contact information and exit.
-in input_file
  Read input from the specified file. (Default is to read from stdin.)
-interval interval
  Set the number of data elements in each repeat block. Default is 1.
-multiple multiple
  The number of data elements to dump from each block (all to one line). Defaults to interval.
-offset offset
  Emit data elements starting at offset data elements from the beginning of the file. Default is 0.
-out output_file
  Write output to the specified file. (Default is to write to stdout.)
-show show
  Controls numbering of output lines. Positions are offsets relative to -offset. That is, if -offset is set to 5 then element 5 is shown with position 0. Options are:
    0 do not number output lines default
    1 number by bytes (hexadecimal)
    2 number by data element (hexadecimal)
    3 number by blocks (hexadecimal)
    4 number by bytes (octal)
    5 number by data element (octal)
    6 number by blocks (octal)
    7 number by bytes (decimal)
    8 number by data element (decimal)
    9 number by blocks (decimal)
-signed
  Default is for integer data elements to be unsigned. This flag makes them signed. Ignored for f,d, and g data types. To obtain signed output for g type use a format string like '%18lld'.

EXAMPLES

% mdump
% mdump -h % mdump -dtype l -format ' %8.8x' -interval 4 -show 2 somefile % echo ABCD | mdump -dtype c -format ' %3.3o' -interval 4 -blocks 1

SEE ALSO

none

LICENSE

You may run this program on any platform. You may redistribute the source code of this program subject to the condition that you do not first modify it in any way. You may distribute binary versions of this program so long as they were compiled from unmodified source code. There is no charge for using this software. You may not charge others for the use of this software.

COPYRIGHT

Copyright (C) 2002 David Mathog and Caltech.

AUTHORS

David Mathog, Biology Division, Caltech <mathog@caltech.edu>


mdump (1) 21 Feb 2002