From dcb1a9f51d965e1331a23b928fcff408d4e4a779 Mon Sep 17 00:00:00 2001 From: Huck Boles Date: Tue, 20 Dec 2022 12:19:36 -0600 Subject: [PATCH] README update --- README.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 9594ac6..dc1beff 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,26 @@ # *base* - CLI utility to convert numbers between arbitrary bases. -*base* +*base* converts from base 10 to binary if called with no options. Input and output base can be specified with -i and -o respectively, ranging from 2-62. If no number is given, base will prompt for a number, or convert stdin if given. +If not specified, base will print binary numbers as unsigned longs with 64 bits, hexadecimal numbers with a leading 0x, octal and any other number with no leading zeroes. Truncation/leading zeroes can be specified with -l and -L, giving the number of digits from the lowest or highest number, respectively. ## Usage: - Print binary representation: $ base 555 - 00000000 00000000 00000000 00000000 00000000 00000000 00000010 00101011 -- Print a number in base 16: - - $ base -o 16 1234 +- Print a number in hexadecimal: + $ base -o 16 1234 0x4d2 -- Print an base 8 representation of a base 12 number - - $ base -o 8 -i 16 5a +- Print an octal representation of a base 12 number + $ base -o 8 -i 12 5a 106 -- Call without an input number to convert stdin +- Convert stdin to base 8 $ echo "123456" | base -o 8 @@ -34,13 +32,12 @@ $ unzip base-{branch}.zip - OR + ***OR*** $ tar -I gzip -cvf base-{branch}.tar.gz - Build base from source $ cd base-{branch} - $ sudo make install -- 2.45.2