Wednesday, November 2, 2011

How to convert a binary number to decimal in Bash

Following is how you can convert a binary number to decimal in Linux Bash
    echo $(( 2#101 ))
This  command will return
    5

 

No comments:

Post a Comment