i cut the ip add ect: 10.0.0.0/4 into octet then when i change the octet to binary, it only appear like 1010 not 00001010, how can i make the output with octet format like 00001010. I already try
#!/bin/bash
y=00000000
o="$(echo "obase=2; 10" | bc)"
echo "ibase=2;obase=2; $y+$o" | bc -l
But the output still 1010