From: git Date: Mon, 16 Feb 2026 10:13:34 +0000 (-0500) Subject: added README X-Git-Url: https://git.datadissipation.net/?a=commitdiff_plain;h=283dadb49daf91a9d410409bfa1861f36323c351;p=baseconv.git added README --- diff --git a/README.md b/README.md new file mode 100644 index 0000000..f96d6a6 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +##tohex + + * `-l` - output numbers with lowercase characters + * `-m` - output only the converted numbers + * `-n` - output a single line (space-separated with `-m`, semicolon as the separator otherwise) + * `-p` - add `0x` prefix to the result + +##tobin + + * `-m` - output only the converted numbers + * `-n` - output a single line (space-separated with `-m`, semicolon as the separator otherwise) + * `-p` - add `0b` prefix to the result + +##todec + + * `-m` - output only the converted numbers + * `-n` - output a single line (space-separated with `-m`, semicolon as the separator otherwise) + * `-K` - divide the result by *1024* and append `K` to the result + * `-M` - divide the result by *1,048,576* and append `M` to the result + * `-G` - divide the result by *1,073,741,824* and append `G` to the result diff --git a/todec b/todec index feaff7e..5ef3a84 100755 --- a/todec +++ b/todec @@ -46,7 +46,7 @@ main() { stat=0 k=1; m=0; n=0; p=''; - while getopts "bmnKMG" flag; do + while getopts "mnKMG" flag; do case "$flag" in m) m=1; ;; n) n=1; ;;