Re: [Bashburn-info] Gettext support
Brought to you by:
bashburn
|
From: Steven W. O. <st...@sy...> - 2008-09-11 14:11:31
|
On Thursday, Sep 11th 2008 at 03:11 -0000, quoth Nick Warne:
=>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, you're so modest! This is officially sexy. :-)
--
Time flies like the wind. Fruit flies like a banana. Stranger things have .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net
|