> It's the same on a Windows and a HP-UX box. I guess it's libc or the
> shell which is to blame, but why does it incorrectly parse 036 as 30?
> I know that 036 in octal is 30, but I didn't specify a backslash.
It is parsed just as you suspect ...
> Is there something I should know?
Yes :-) You should know how to atoi() :-)
Watch:
[root@waiting]:/usr/home/cmatei # ping 0x8d.0x55.130.16
PING 0x8d.0x55.130.16 (141.85.130.16): 56 data bytes
64 bytes from 141.85.130.16: icmp_seq=0 ttl=64 time=6.8 ms
64 bytes from 141.85.130.16: icmp_seq=1 ttl=64 time=1.6 ms
BTW, same happens if you put zero-padded (or 0x-padded) numbers in
/etc/hosts for example ...
> Best regards,
> Brian
Matei
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu