Re: printf has weird behaviour when parsing zero padded numbers

2009-06-22 Thread Chris F.A. Johnson
On Mon, 22 Jun 2009, Greg Wooledge wrote: > On Fri, Jun 19, 2009 at 11:05:27AM -0700, bitozoid wrote: > > > edua...@ceo ~ $ printf "%02d\n" 8 > > > -bash: printf: 8: invalid number > > > Sorry, not a bug, but octal representation. Really sorry. > > Others will make the sa

Re: printf has weird behaviour when parsing zero padded numbers

2009-06-22 Thread Greg Wooledge
On Fri, Jun 19, 2009 at 11:05:27AM -0700, bitozoid wrote: > >         edua...@ceo ~ $ printf "%02d\n" 8 > >         -bash: printf: 8: invalid number > Sorry, not a bug, but octal representation. Really sorry. Others will make the same mistake (it's very common), so for the benefit of peop

Re: printf has weird behaviour when parsing zero padded numbers

2009-06-20 Thread bitozoid
On Jun 19, 6:58 pm, bitozoid wrote: > Configuration Information [Automatically generated, do not change]: > Machine: i686 > OS: linux-gnu > Compiler: i686-pc-linux-gnu-gcc > Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' - > DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu