From: git Date: Sat, 16 May 2026 06:03:26 +0000 (-0400) Subject: update readme X-Git-Url: https://git.datadissipation.net/?a=commitdiff_plain;ds=sidebyside;p=baseconv.git update readme --- diff --git a/README.md b/README.md index 97fbc8c..04ed88e 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,28 @@ -#Installation - -Create a directory for local executables (`~/.local/bin/` is recommended) and add it to `PATH` (add `export PATH="${PATH}:${HOME}/.local/bin"` to your `~/.profile` - it may also be `~/.bash_profile` or `~/.zprofile` for ZSH), copy the files into that folder. - -#dc branch +## dc branch Using the dc-based branch might be beneficial for systems where `bc` is a `dc` wrapper, `printf` command does not support base conversion, etc. -In short, it is even more portable. +In short, it should be even more portable. -#Usage +## Usage -##tohex +### 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 + * `-n` - output all in a single line (space-separated with `-m`, semicolon as the separator otherwise) + * `-p` - add `0x` prefix to the resulting numbers -##tobin +### 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 + * `-n` - output all in a single line (space-separated with `-m`, semicolon as the separator otherwise) + * `-p` - add `0b` prefix to the resulting numbers -##todec +### 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 + * `-n` - output all in a single line (space-separated with `-m`, semicolon as the separator otherwise) + * `-K` - convert the results into _K_ units (2^10^) + * `-M` - convert the results into _M_ units (2^20^) + * `-G` - convert the results into _G_ units (2^30^)