s6-linux-init
Software
skarnet.org
The s6-linux-init-echo program
s6-linux-init-echo writes its arguments to stdout.
Interface
s6-linux-init-echo [ -n ] [ -s sep ] args...
s6-linux-init-echo writes its arguments args to stdout, separated with spaces.
Options
- -n : do not output a trailing newline.
- -s sep : separate arguments with the sep
character instead of a space.
Notes
- Strange, and appalling, as it may seem for such a simple task, there is
no way to ensure that the echo program will behave consistently from
Unix system to Unix system - and even from Linux distribution to Linux
distribution. Despite there being a
standard
for it, the echo commands in GNU coreutils, busybox, toybox, sbase, and
other implementations basically all exhibit different behaviours. Every shell has
a built-in echo command, that fails to follow the POSIX standard. echo
is the prime example of the consequences of the blatant disregard of early Unices
for cross-system compatibility, and its followup as a turf war between GNU and the
rest of the Linux world. As a distribution-agnostic software developer, it is ironically
impossible to rely on a definite behaviour of the echo command on every
supported system, and that is why s6-linux-init provides its own implementation.
Fortunately, it is very easy to do so, with minimal overhead.
- This command is an exact duplicate of the
s6-echo command
provided in the s6-portable-utils
package. It was decided not to have a dependency from s6-linux-init to
s6-portable-utils: that dependency would arguably be a higher cost than the small
amount of code duplication.