From: Huck Boles Date: Sun, 1 Jan 2023 06:00:12 +0000 (-0600) Subject: Sun Jan 1 12:00:12 AM CST 2023 automatic backup X-Git-Url: https://git.huck.website/?a=commitdiff_plain;h=729b3ae2a276311c400179c5d650932e32823e16;p=base.git Sun Jan 1 12:00:12 AM CST 2023 automatic backup --- 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