19 Jun
2003
19 Jun
'03
13:00
Rohit wrote:
awk "BEGIN {print 051;}" outputs 41.
Does anyone know why ?
because you're printing an octal value in decimal?
To clarify that
051 in octal = 0x64 + 5x8 + 1 = 0 + 40 + 1 = 41
Ooh .. that confuses the whole issue because '0x64' is interpreted as the hex value 64 (100 decimal) in Awk ;-) (Sorry, just being pedantic before going to lunch) sjb