EnderUNIX Team.


EnderUNIX tips

Mail to My Friend , Home Page

[ Console ]

"conversion to decimal under bash console" - Barış Şimşek - (2004-08-27 10:41:54)   [17895]

You can convert binary, octal, hexadecimal or any other numbers to decimal numbers under bash.

echo $(( base#number ))

Examples:

b$ echo $(( 2#11011 ))
27

b$ echo $(( 10#128 ))
128

b$ echo $(( 16#A0 ))
160

Mail to My Friend , Home Page