Bash shell Decimal to Binary base 2 conversion

You can use bc as:

echo "obase=2;$ip1" | bc

See it

Leave a Comment