From 729b3ae2a276311c400179c5d650932e32823e16 Mon Sep 17 00:00:00 2001 From: Huck Boles Date: Sun, 1 Jan 2023 00:00:12 -0600 Subject: [PATCH] Sun Jan 1 12:00:12 AM CST 2023 automatic backup --- README.md | 42 +++++++++++++----------------------------- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 7f6d950..81f2956 100644 --- a/README.md +++ b/README.md @@ -1,48 +1,32 @@ -# *base* - CLI utility to convert numbers between arbitrary bases. +# base +CLI utility to convert numbers between arbitrary bases. -*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 starting position from lowest or highest digit respectively. +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. ## Usage: - -- Print binary representation: - +Print binary representation: $ base 555 - 00000000 00000000 00000000 00000000 00000000 00000000 00000010 00101011 -- Print a number in hexadecimal: - +Print a number in hexadecimal: $ base -o 16 1234 - 0x4d2 -- Print an octal representation of a base 12 number - +Print an octal representation of a base 12 number $ base -o 8 -i 12 5a - 106 -- Convert stdin to base 8 - + Convert stdin to base 8 $ echo "123456" | base -o 8 - 361100 ## Installation : - -- Download .zip or .tar.gz and decompress - - $ unzip base-{branch}.zip - - ***OR*** - - $ tar -I gzip -cvf base-{branch}.tar.gz +Download .tar.gz and decompress + $ curl "https://download.huck.website/base-[VERSION].tar.gz" + $ tar -xzvf base-[VERSION].tar.gz -- Build base from source - - $ cd base-{branch} - - +Build base from source + $ cd base-[VERSION] $ sudo make install -- 2.45.2