Hi,
the ifconfig output of my machine is the following:
:~ shell$ ifconfig en0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:25:bc:e7:39:6a
inet6 fe80::225:bcff:fee7:396a%en0 prefixlen 64 scopeid 0x4
inet 10.170.133.45 netmask 0xffffff00 broadcast 10.170.133.255
media: autoselect (100baseTX <full-duplex>)
status: active
I know that netmask 0xffffff00 is the hexadecimal representation of 255.255.255.0.
But which is the correct way of converting that string into the octet format?
Can you suggest some unix command or shell script?