Re: qwerty

2009-11-12 Thread Antonio Macchi
http://www.opengroup.org/onlinepubs/9699919799/utilities/printf.html#tag_20_94 (ouch!) ok! thanks!

Re: qwerty

2009-11-12 Thread pk
Antonio Macchi wrote: > I'm on error, I know... but, in your bash-ref guide you don't explain a > lot printf > > and in man printf don't do it too... > > from man printf > - > NOTE: your shell may have its own version of printf, which usually > supersedes the versio

Re: qwerty

2009-11-12 Thread Chet Ramey
Antonio Macchi wrote: > I'm on error, I know... but, in your bash-ref guide you don't explain a > lot printf > > and in man printf don't do it too... http://www.opengroup.org/onlinepubs/9699919799/utilities/printf.html#tag_20_94 -- ``The lyf so short, the craft so long to lerne.'' - Chaucer

Re: qwerty

2009-11-12 Thread Antonio Macchi
I'm on error, I know... but, in your bash-ref guide you don't explain a lot printf and in man printf don't do it too... from man printf - NOTE: your shell may have its own version of printf, which usually supersedes the version described here. Please refer to your s

Re: qwerty

2009-11-11 Thread Chet Ramey
Ken Irving wrote: >> $ printf "%d %s\n" 1 ok - >> 1 ok >> -bash: printf: -: invalid number >> 0 >> >> why getting error here, and not in the previous? >> why "invalid number" ? >> what is that zero? > > Again, you have more arguments than operators, so it makes another pass, > and on the second p

Re: qwerty

2009-11-11 Thread Antonio Macchi
There's nothing to fix. It might help if you provide some markers sorry, and thanks for your patience... in your test patterns so you can see where each argument begins and ends, e.g., $ printf "(%d) {%s}\n" 1 ok - (1) {ok} -bash: printf: -: invalid number (0) {} ... and f

Re: qwerty

2009-11-11 Thread Ken Irving
to format - as a number... Don't know about the zero, but I guess %d maybe starts with a default of 0...? > > > $ printf "%2s\n" qwerty > qwerty > > strings larger than fixed-width are entire written? It's not fixed width but minimum width. > I

qwerty

2009-11-11 Thread Antonio Macchi
$ printf "%s\n" ok - ok - why that score in the newline? $ printf "%d %s\n" 1 ok - 1 ok -bash: printf: -: invalid number 0 why getting error here, and not in the previous? why "invalid number" ? what is that zero? ---- $ printf "%2s\n"