aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/doc/numconvert.1.in
diff options
context:
space:
mode:
authorDavid M. Syzdek <david@syzdek.net>2021-10-11 19:25:53 -0800
committerDavid M. Syzdek <david@syzdek.net>2021-10-11 19:25:53 -0800
commitcd3ac306aa9dff9b3d7826023ec4123ec3ef0c42 (patch)
treeb2790764a3c4dd990a1306369893340c8e33d8ae /doc/numconvert.1.in
parentd2ee4fc56477e9d5bfb18c629585db9cac310190 (diff)
downloaddmstools-cd3ac306aa9dff9b3d7826023ec4123ec3ef0c42.tar.gz
dmstools-cd3ac306aa9dff9b3d7826023ec4123ec3ef0c42.tar.bz2
dmstools-cd3ac306aa9dff9b3d7826023ec4123ec3ef0c42.tar.xz
dmstools-cd3ac306aa9dff9b3d7826023ec4123ec3ef0c42.zip
numconvert: updating man page
Diffstat (limited to '')
-rw-r--r--doc/numconvert.1.in83
1 files changed, 72 insertions, 11 deletions
diff --git a/doc/numconvert.1.in b/doc/numconvert.1.in
index 160115a..03a4135 100644
--- a/doc/numconvert.1.in
+++ b/doc/numconvert.1.in
@@ -37,20 +37,31 @@
37.SH NAME 37.SH NAME
38numconvert \- displays values using multiple numeral systems 38numconvert \- displays values using multiple numeral systems
39.SH SYNOPSIS 39.SH SYNOPSIS
40\fBnumconvert\fR [\fB-BbDdlOoRrsXx\fR] [\fInumber1 number2 ... numberN\fR] 40\fBnumconvert\fR [\fB-a\fR | \fB-b\fR | \fB-d\fR \fB | \fB-o\fR | \fB-x\fR] [\fB-ABDlOqRrsX\fR] [\fB-f\fR \fIorder\fR] \fInumber1\fR [\fInumber2\fR [\fInumberN\fR]]
41.sp 41.sp
42\fBnumconvert\fR [\fB--help\fR | \fB-h\fR] [\fB--version\fR | \fB-V\fR] 42\fBnumconvert\fR [\fB--help\fR | \fB-h\fR]
43.sp
44\fBnumconvert\fR [\fB--version\fR | \fB-V\fR]
43 45
44.SH DESCRIPTION 46.SH DESCRIPTION
45The \fBnumconvert\fR utility is a filter which displays numbers using different 47The \fBnumconvert\fR utility converts values between numeral systems.
46numeral systems. Input strings which are prefixed with \fI0x\fR are assumed to be 48\fBnumconvert\fR uses prefiexes to determine the input notation of a value if
47 hexidecimal numerals. Input strings which are prefixed with a single `\fI0\fR' 49an input notation option is not specified. Strings with the prefix \fI0x\fR
48character are assumed to be octal numerals. Input strings which are prefixed with 50are treated as hexadecimal input; \fI00\fR and \fI0b\fR as binary input; and
49`\fI00\fR' are assumed to be binary numerals. All other strings are assumed 51\fI0\fR followed by a non-zero numeric character as octal input. If the input
50to be in decimal numerals. 52does not use a known prefix, the input will be treat as decimal if the input
53string contains only decimal numerals. If \fBnumconvert\fR is unable to
54determine the numeral system of the input, the input will be treated as an
55ASCII string.
51 56
52.SH OPTIONS 57.SH OPTIONS
53.TP 58.TP
59\fB-A\fR
60Display the values as an ASCII character
61.TP
62\fB-a\fR
63Process input as individual ASCII characters
64.TP
54\fB-B\fR 65\fB-B\fR
55Display the values as binary numerals. 66Display the values as binary numerals.
56.TP 67.TP
@@ -63,11 +74,16 @@ Display the values as decimal numerals.
63\fB-d\fR 74\fB-d\fR
64Process input strings as decimal numerals. 75Process input strings as decimal numerals.
65.TP 76.TP
77\fB-f\fR \fIorder\fR
78Set order of output values if specifing multiple formats. Use '\fIa\fR' for
79ASCII; '\fIb\fR' for binary; '\fId\fR' for decimal; '\fIo\fR' for octal;
80and '\fIx\fR' for hexadecimal. The default order is '\fIabxod\fR'.
81.TP
66\fB\-h\fR, \fB--help\fR 82\fB\-h\fR, \fB--help\fR
67Displays usage information and exits. 83Displays usage information and exits.
68.TP 84.TP
69\fB-l\fR 85\fB-l\fR
70Display hexadecimal and binary numerals using the least amount of digits possible. 86Display values with padding for maximum values instead of assuming 32 bit values.
71.TP 87.TP
72\fB-O\fR 88\fB-O\fR
73Display the values as octal numerals. 89Display the values as octal numerals.
@@ -75,6 +91,9 @@ Display the values as octal numerals.
75\fB-o\fR 91\fB-o\fR
76Process input strings as octal numerals. 92Process input strings as octal numerals.
77.TP 93.TP
94\fB-q\fR
95Suppress column names in output.
96.TP
78\fB-R\fR 97\fB-R\fR
79Display binary numerals in little endian byte order. 98Display binary numerals in little endian byte order.
80.TP 99.TP
@@ -93,11 +112,53 @@ Display the values as hexadecimal numerals.
93\fB-x\fR 112\fB-x\fR
94Process input strings as hexadecimal numerals. 113Process input strings as hexadecimal numerals.
95 114
115.SH EXAMPLES
116The following example converts values to ASCII, binary, hexadecimal,
117and decimal:
118.sp
119.RS
120numconvert -A -B -X -D 0001000001 0102 67
121.br
122TXT, Binary, Hex, Decimal
123.br
124\'A\', 00000000 00000000 00000000 01000001, 0x00000041, 65
125.br
126\'B\', 00000000 00000000 00000000 01000010, 0x00000042, 66
127.br
128\'C\', 00000000 00000000 00000000 01000011, 0x00000043, 67
129.RE
130
131The following example inteprets the input as decimal and displays the values
132as binary, hexadecimal, and decimal:
133.RS
134numconvert -d -B -X -D 0001000001 0102 67
135.br
136 Binary, Hex, Decimal
137.br
13800000000 00001111 01000010 01000001, 0x000F4241, 1000001
139.br
14000000000 00000000 00000000 01100110, 0x00000066, 102
141.br
14200000000 00000000 00000000 01000011, 0x00000043, 67
143.RE
144
145The following example changes the order of the output:
146.RS
147numconvert -d -B -X -D -f \'dxb\' 0001000001 0102 67
148.br
149 Decimal, Hex, Binary
150.br
151 1000001, 0x000F4241, 00000000 00001111 01000010 01000001
152.br
153 102, 0x00000066, 00000000 00000000 00000000 01100110
154.br
155 67, 0x00000043, 00000000 00000000 00000000 01000011
156.RE
157
96.SH "REPORTING BUGS" 158.SH "REPORTING BUGS"
97Report bugs to David M. Syzdek <@PACKAGE_BUGREPORT@>. 159Report bugs to David M. Syzdek <@PACKAGE_BUGREPORT@>.
98 160
99.SH "SEE ALSO" 161.SH "SEE ALSO"
100.BR bitops (1), 162.BR bitops (1),
101.BR codetagger (1), 163.BR bindump (1),
102.BR numconvert (1)
103.\" end of man page 164.\" end of man page