Bug#826214: Bug#913247: Please provide a C implementation of /lib/init/init-d-script

Thorsten Glaser t.glaser at tarent.de
Sat Dec 1 18:48:25 GMT 2018

On Sat, 1 Dec 2018, Dmitry Bogatov wrote:

> AFAIK, in shell [ "${foo}" ] is equal to [ -n "${foo}" ].

Not always / portably.

I recommend

	test -n "$foo"

for POSIX (which is equivalent to [ -n "$foo" ] but better legible and
making it clear that test is an external command, not a language con‐
struct), and

	[[ $foo ]]

for Korn shell and compatibles, including (here) GNU bash.

//mirabilos (mksh developer)
15:41⎜<Lo-lan-do:#fusionforge> Somebody write a testsuite for helloworld :-)

More information about the Debian-init-diversity mailing list