The printf approach (GNU gettext utilities)

Next: , Previous: , Up: sh - Shell Script [Contents][Index]


15.5.15.3 The printf approach

This approach uses a POSIX:2024 compliant printf command.

Here’s an example that references a shell variable pid:

env printf "`gettext \"Running as process number %u.\"`"'\n' $pid

An example is available in the hello-2.sh file in the examples/hello-sh directory.

Advantages and Drawbacks

Drawbacks:


Next: The printf_gettext approach, Previous: The gettext.sh approach, Up: sh - Shell Script [Contents][Index]

AltStyle によって変換されたページ (->オリジナル) /