I\'m looking for an easy way in Bash to convert a decimal number into a binary number. I have variables that need to be converted:
$ip1 $ip2 $ip3 $ip4
You can use bc as:
bc
echo "obase=2;$ip1" | bc
See it