4 ms·
Well, that works up to a point. Fore some, that point might be considered a bit too close to zero... $ printf "%d\n" 009 sh: 1: printf: 009: not comple
by scbrg 8y ago
Well, that works up to a point. Fore some, that point might be considered a bit too close to zero...
$ printf "%d\n" 009
sh: 1: printf: 009: not completely converted
0
- jandrese 8y ago0-prefix octal notation continues to be a mistake. I love when programs mysteriously fail when passed an IP address like 192.168.001.009. Thankfully modern tools have been moving away from supporting that notation and are less likely to explode all over unsuspecting users.
- neokantian 8y agoYes, you are right. This seems to work better: $ printf "%1.0f\n" 009 9 $ printf "%1.0f\n" 00125990 125990