Re: [Bashburn-info] Gettext support
Brought to you by:
bashburn
|
From: Nick W. <ni...@uk...> - 2008-09-11 07:10:54
|
On Wed, 10 Sep 2008 22:30:05 -0400 (EDT)
"Steven W. Orr" <st...@sy...> wrote:
> >From bash however, we are given an extra obstacle. There are two
> >printf's.
> One is the builtin inside bash:
>
> 1519 > printf 'number1 is %2$s, and number2 is %1$s.\n' number2,
> number1 bash: printf: `$': invalid format character
> number1 is 1520 >
>
> The other is the binary that's seperate from the builtin:
>
> 1520 > /usr/bin/printf 'number1 is %2$s, and number2 is %1$s.\n' \
> number2 number1
> number1 is /usr/bin/printf: %$: invalid directive
> 1521 >
>
> So we can see that they both don't work. Don't let that bother you.
> Just pretend that the functionality is really there. Worst case I can
> write a printf that does what we want. z.b.,
>
> awk 'BEGIN {printf "number1 is %2$s, and number2 is %1$s.\n",
> "number2", "number1"}'
> number1 is number1, and number2 is
> number2.
>
I just found this:
http://www.linuxtopia.org/online_books/advanced_bash_scripting_guide/localization.html
I don't know if it helps here.
Nick
--
Free Software Foundation Associate Member 5508
|