I would like to cancel the operation performed by the following bash command:
$ echo $((62
i.e. convert the decimal number 9207903953 to base 62, preserving the bash standard {0..9},{a..z},{A..Z} .
I know I can do this using bc , but I will have to manually convert each character. For example, I am doing this currently:
BASE62=($(echo {0..9} {a..z} {A..Z})) for i in $(echo "obase=62; 9207903953" | bc) do echo -n ${BASE62[$i]}
There must be a way to do this in a less "hacky" way. Do you know how to do this more efficiently?
EDIT: changed input bc .
source share