ascii2binary(1) | General Commands Manual | ascii2binary(1) |
ascii2binary - Convert ASCII numbers to binary
ascii2binary [flags]
ascii2binary reads input consisting of a sequence of ASCII textual representations of numbers, separated by whitespace, and produces as output the binary equivalents. The type (unsigned integer, signed integer, or floating point number) and size of the binary output is selected by means of command line flags. The default is unsigned character. Input is checked both for format errors and to ensure that the number requested can be represented in a number of the requested binary type and size.
The input formats supported are exactly those supported by strtod(3) for floating point numbers, by strtoll(3) for signed integers, and by strtoull(3) for unsigned integers, except that, unlike strtod(3) floating point numbers may have thousands separators. This means that by default integers may be decimal, octal, or hexadecimal, determined by the usual conventions. The command line flag -b may be used to specify another base for integer conversions.
Long options may not be available on some systems.
(b)binary
(o)octal
(d)ecimal
(h)exadecimal.
The following are the possible output types. Note that some types may not be available on some machines.
d double
f float
sc signed char
ss signed short
si signed int
sl signed long
sq signed long long
uc unsigned char
us unsigned short
ui unsigned int
ul unsigned long
uq unsigned long long
The following values are returned on exit:
Bill Poser (billposer@alum.mit.edu)
GNU General Public License, version 3
July, 2010 |