Converting number from any base system to decimal in linux shell

Problem

You would like to quickly convert a number from a different base system (i.e. binary, octal, hexadecimal), to decimal.

Solution

Use the echo $(()) shell command to convert it passing it the current base system and the number, as in $((2#101010)) or using the O for octal or 0x for hexadecimal notations.
Examples:

Taken from Linux Journal’s Work the Shell column (March 2016)

rvm “You need to change your terminal emulator preferences to allow login shell.”

Problem

After a new rvm installation in an (k)ubuntu system you get the following error from rvm when trying to switch between rubies:

Solution

As the message suggests you can change the setting in your terminal which is fine if you are using the gnome-terminal by going to the link provided:

but if you are using Konsole in KDE you need to go to a different link that explains the change in the settings: