-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbaseconv.1
93 lines (71 loc) · 2.19 KB
/
baseconv.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
.TH BASECONV 1 "June 2024" "Version 1.1" "User Commands"
.SH NAME
baseconv \- convert numbers between different numerical bases
.SH SYNOPSIS
.B baseconv
[\fB--help\fR | \fB-he\fR]
[\fB-base\fR " base "]
[\fB--bin\fR | \fB--dec\fR | \fB--hex\fR | \fB--oct\fR]
.I num
[\fB--all\fR | \fB--bin\fR | \fB--dec\fR | \fB--hex\fR | \fB--oct\fR | -(first char of desired output bases concatenated with - as separator)]
.SH DESCRIPTION
.B baseconv
is a command-line utility to convert a number (specified in various numerical bases) into different representations, including binary, decimal, hexadecimal, and octal. It supports custom input bases and flexible output format selection.
.SH OPTIONS
.TP
.B -base " base "
Specify a custom numerical base for input. The base must be an integer between 2 and 36.
.TP
.B --bin, -b
Convert the input number as binary (base-2).
.TP
.B --dec, -d
Convert the input number as decimal (base-10).
.TP
.B --hex, -h
Convert the input number as hexadecimal (base-16).
.TP
.B --oct, -o
Convert the input number as octal (base-8).
.TP
.B --all, -a
Display all conversions: binary, decimal, hexadecimal, and octal.
.TP
.B --bin, -b
Display the input number in binary (base-2).
.TP
.B --dec, -d
Display the input number in decimal (base-10).
.TP
.B --hex, -h
Display the input number in hexadecimal (base-16).
.TP
.B --oct, -o
Display the input number in octal (base-8).
.TP
.B -(first char of desired output bases concatenated with - as separator)
Display the input number in a custom order of bases (e.g., -b-d outputs -b and -d).
.SH EXAMPLES
.PP
Convert a number from hexadecimal to decimal:
.B
baseconv --hex 1A --dec
.PP
Convert a number from binary to all supported bases:
.B
baseconv --bin 1010 --all
.PP
Custom input and custom output combination of bases:
.B
baseconv -base 20 1234 -d-b-o-h
.SH SEE ALSO
.BR man "(1)"
.SH AUTHOR
Written by TensorPhobia.
.SH BUGS
Report bugs to tensorphobia@gmail.com.
.SH PROJECT PAGE
Visit the project's GitHub page for contributions and bug reports:
.BR https://github.com/TensorPhobia/baseconv
.SH COPYRIGHT
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.