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: