http://www.opengroup.org/onlinepubs/9699919799/utilities/printf.html#tag_20_94
(ouch!)
ok!
thanks!
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
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
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
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
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
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
$ 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"