W
Walter Roberson
But the only reason to
execute "/bin/true --version" with the expectation of having it do
nothing is deliberate conformance testing. There's no real-world
reason to give it an argument at all.
Real life example:
Portable(-ish) Makefiles with a step that would normally be
ar -t (topological sort on the archive contents) but that step
is unneeded or unimplemented on some architectures. The usual
solution is to parameterize the program name as a variable in
the makefile, and for those architectures that do not need or
support the step, use /bin/true or ':' (colon) as the program name,
taking advantage of the fact that arguments will be ignored but
the step will be considered to succeed.