My data is :
192.168.0.0/24
the sed expressions is to convert from decimal to binary.
s/<0>/00000000/g
s/<1>/00000001/g
.......
s/<255>/11111111/g
this works fine on everything except for the /24. if there is no space it won't convert if there is a space it then it will convert the 24. this works fine with native sed.
so the data becomes,
11000000.10101000.00000000.00000000/24
when it should be.
11000000.10101000.00000000.00000000/00011000